Skip to content

Commit aa344f2

Browse files
authored
fix(trino): Reactivate the commitid plugin, otherwise tests fail (#1160)
1 parent ba8fbf3 commit aa344f2

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

trino/Dockerfile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ cd "$(/stackable/patchable --images-repo-root=src checkout trino ${PRODUCT})"
2727
# Create snapshot of the source code including custom patches
2828
tar -czf /stackable/trino-${PRODUCT}-src.tar.gz .
2929

30+
# Trino is using something (git-commit-id-plugin in the past, maybe something else now) that is
31+
# reading the Git history and searches for a tag to pull the version from. It sounds weird to me
32+
# why someone would do that over just picking the version from the pom.xml, but they propably
33+
# have their reasons. See e.g. https://github.com/trinodb/trino/discussions/18963.
34+
# So we fake it till we make it and create a Git repo and the correct tag. The trino-operator
35+
# smoke test checks that "select version()" is working.
36+
# 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
37+
rm .git
38+
git init
39+
git config user.email "fake.commiter@stackable.tech"
40+
git config user.name "Fake commiter"
41+
git commit --allow-empty --message "Fake commit, so that we can create a tag"
42+
git tag ${PRODUCT}
43+
3044
SKIP_PROJECTS="!docs"
3145
if [ "$PRODUCT" = "470" ] || [ "$PRODUCT" = "451" ]; then
3246
SKIP_PROJECTS="$SKIP_PROJECTS,!core/trino-server-rpm"
@@ -41,7 +55,6 @@ fi
4155
-DskipTests `# Skip test execution` \
4256
-Dcheckstyle.skip `# Skip checkstyle checks. We dont care if the code is properly formatted, it just wastes time` \
4357
-Dmaven.javadoc.skip=true `# Dont generate javadoc` \
44-
-Dmaven.gitcommitid.skip=true `# The gitcommitid plugin cannot work with git workspaces (ie: patchable)` \
4558
--projects="$SKIP_PROJECTS"
4659

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

0 commit comments

Comments
 (0)