Skip to content

fix(trino): Reactivate the commitid plugin, otherwise tests fail #1160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion trino/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ cd "$(/stackable/patchable --images-repo-root=src checkout trino ${PRODUCT})"
# Create snapshot of the source code including custom patches
tar -czf /stackable/trino-${PRODUCT}-src.tar.gz .

# Trino is using something (git-commit-id-plugin in the past, maybe something else now) that is
# reading the Git history and searches for a tag to pull the version from. It sounds weird to me
# why someone would do that over just picking the version from the pom.xml, but they propably
# have their reasons. See e.g. https://github.com/trinodb/trino/discussions/18963.
# So we fake it till we make it and create a Git repo and the correct tag. The trino-operator
# smoke test checks that "select version()" is working.
# Also, we need to initialize a new Git repo because `git-commit-id-maven-plugin` has a problem with worktrees, see https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/215
rm .git
git init
git config user.email "[email protected]"
git config user.name "Fake commiter"
git commit --allow-empty --message "Fake commit, so that we can create a tag"
git tag ${PRODUCT}

SKIP_PROJECTS="!docs"
if [ "$PRODUCT" = "470" ] || [ "$PRODUCT" = "451" ]; then
SKIP_PROJECTS="$SKIP_PROJECTS,!core/trino-server-rpm"
Expand All @@ -41,7 +55,6 @@ fi
-DskipTests `# Skip test execution` \
-Dcheckstyle.skip `# Skip checkstyle checks. We dont care if the code is properly formatted, it just wastes time` \
-Dmaven.javadoc.skip=true `# Dont generate javadoc` \
-Dmaven.gitcommitid.skip=true `# The gitcommitid plugin cannot work with git workspaces (ie: patchable)` \
--projects="$SKIP_PROJECTS"

# Delete intermediate build products to free some space and keep runners happy
Expand Down