Skip to content

Commit dd7d6ed

Browse files
authored
fix(trino): Correctly report Trino version (#881)
* fix(trino): Correctly report Trino version * changelog
1 parent 411bd57 commit dd7d6ed

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ All notable changes to this project will be documented in this file.
4848
### Fixed
4949

5050
- hbase: link to phoenix server jar ([#811]).
51+
- trino: Correctly report Trino version ([#881]).
5152

5253
[#783]: https://github.com/stackabletech/docker-images/pull/783
5354
[#797]: https://github.com/stackabletech/docker-images/pull/797
@@ -71,6 +72,7 @@ All notable changes to this project will be documented in this file.
7172
[#877]: https://github.com/stackabletech/docker-images/pull/877
7273
[#878]: https://github.com/stackabletech/docker-images/pull/878
7374
[#879]: https://github.com/stackabletech/docker-images/pull/879
75+
[#881]: https://github.com/stackabletech/docker-images/pull/881
7476

7577
## [24.7.0] - 2024-07-24
7678

trino/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,19 @@ COPY --chown=stackable:stackable trino/stackable/patches/${PRODUCT} /stackable/t
5757
# hadolint ignore=SC2215
5858
RUN --mount=type=cache,target=/root/.m2/repository cd "trino-server-${PRODUCT}-src" && \
5959
./patches/apply_patches.sh ${PRODUCT} && \
60+
# Trino is using something (git-commit-id-plugin in the past, maybe something else now) that is
61+
# reading the Git history and searches for a tag to pull the version from. It sounds weird to me
62+
# why someone would do that over just picking the version from the pom.xml, but they propably
63+
# have their reasons. See e.g. https://github.com/trinodb/trino/discussions/18963.
64+
# So we fake it till we make it and create a Git repo and the correct tag. The trino-operator
65+
# smoke test checks that "select version()" is working.
66+
git init && \
67+
git config user.email "fake.commiter@stackable.tech" && \
68+
git config user.name "Fake commiter" && \
69+
git commit --allow-empty --message "Fake commit, so that we can create a tag" && \
70+
git tag ${PRODUCT} && \
6071
# We need to use ./mvnw instead of mvn to get a recent maven version (which is required to build Trino)
61-
./mvnw package -DskipTests -Dmaven.gitcommitid.skip=true --projects="!docs,!core/trino-server-rpm" && \
72+
./mvnw package -DskipTests --projects="!docs,!core/trino-server-rpm" && \
6273
# Delete the worst intermediate build products to free some space
6374
rm -r /stackable/trino-server-${PRODUCT}-src/plugin/*/target /stackable/trino-server-${PRODUCT}-src/core/trino-server/target/trino-server-${PRODUCT} && \
6475
# Extract from tarball to save space; the tarball deduplicates jars (replacing them with symlinks),

0 commit comments

Comments
 (0)