From 8774d7a7af6389a10b1e4f0458ac3321cec4becc Mon Sep 17 00:00:00 2001 From: dervoeti Date: Fri, 13 Jun 2025 12:51:40 +0200 Subject: [PATCH 1/3] feat: custom version for Trino --- conf.py | 2 + trino/Dockerfile | 98 ++++--------------- trino/storage-connector/Dockerfile | 24 ++++- trino/storage-connector/versions.py | 3 + trino/trino/Dockerfile | 76 ++++++++++++++ .../451/0001-Add-CycloneDX-plugin.patch | 0 .../stackable/patches/451/patchable.toml | 0 .../470/0001-Add-CycloneDX-plugin.patch | 0 .../stackable/patches/470/patchable.toml | 0 .../476/0001-Add-CycloneDX-plugin.patch | 0 .../stackable/patches/476/patchable.toml | 0 .../stackable/patches/patchable.toml | 0 trino/trino/versions.py | 14 +++ trino/versions.py | 6 +- 14 files changed, 137 insertions(+), 86 deletions(-) create mode 100644 trino/trino/Dockerfile rename trino/{ => trino}/stackable/patches/451/0001-Add-CycloneDX-plugin.patch (100%) rename trino/{ => trino}/stackable/patches/451/patchable.toml (100%) rename trino/{ => trino}/stackable/patches/470/0001-Add-CycloneDX-plugin.patch (100%) rename trino/{ => trino}/stackable/patches/470/patchable.toml (100%) rename trino/{ => trino}/stackable/patches/476/0001-Add-CycloneDX-plugin.patch (100%) rename trino/{ => trino}/stackable/patches/476/patchable.toml (100%) rename trino/{ => trino}/stackable/patches/patchable.toml (100%) create mode 100644 trino/trino/versions.py diff --git a/conf.py b/conf.py index 2840a9511..e60f098d7 100644 --- a/conf.py +++ b/conf.py @@ -33,6 +33,7 @@ superset = importlib.import_module("superset.versions") trino_cli = importlib.import_module("trino-cli.versions") trino = importlib.import_module("trino.versions") +trino_jars = importlib.import_module("trino.trino.versions") trino_storage_connector = importlib.import_module("trino.storage-connector.versions") kafka_testing_tools = importlib.import_module("kafka-testing-tools.versions") kcat = importlib.import_module("kafka.kcat.versions") @@ -66,6 +67,7 @@ {"name": "superset", "versions": superset.versions}, {"name": "trino-cli", "versions": trino_cli.versions}, {"name": "trino", "versions": trino.versions}, + {"name": "trino/trino", "versions": trino_jars.versions}, {"name": "trino/storage-connector", "versions": trino_storage_connector.versions}, {"name": "kafka-testing-tools", "versions": kafka_testing_tools.versions}, {"name": "kafka/kcat", "versions": kcat.versions}, diff --git a/trino/Dockerfile b/trino/Dockerfile index 6158d0602..b06190f58 100644 --- a/trino/Dockerfile +++ b/trino/Dockerfile @@ -3,89 +3,14 @@ FROM stackable/image/trino/storage-connector AS trino-storage-connector-image -FROM stackable/image/java-devel AS trino-builder - -ARG PRODUCT -ARG STACKABLE_USER_UID -ARG JMX_EXPORTER - -WORKDIR /stackable - -COPY --chown=${STACKABLE_USER_UID}:0 trino/stackable/patches/patchable.toml /stackable/src/trino/stackable/patches/patchable.toml -COPY --chown=${STACKABLE_USER_UID}:0 trino/stackable/patches/${PRODUCT} /stackable/src/trino/stackable/patches/${PRODUCT} - -COPY --from=trino-storage-connector-image /stackable/src/trino-storage-connector/patchable-work/worktree/${PRODUCT}/target/trino-storage-${PRODUCT} /stackable/trino-server-${PRODUCT}/plugin/trino-storage-${PRODUCT} -COPY --from=trino-storage-connector-image /stackable/src/trino-storage-connector/patchable-work/worktree/${PRODUCT}/target/bom.json /stackable/trino-server-${PRODUCT}/plugin/trino-storage-${PRODUCT}/trino-storage-${PRODUCT}.cdx.json -COPY --from=trino-storage-connector-image /stackable/trino-storage-connector-${PRODUCT}-src.tar.gz /stackable -COPY --chown=${STACKABLE_USER_UID}:0 trino/stackable/jmx /stackable/jmx - -# adding a hadolint ignore for SC2215, due to https://github.com/hadolint/hadolint/issues/980 -# hadolint ignore=SC2215 -RUN --mount=type=cache,id=maven-${PRODUCT},target=/root/.m2/repository < Date: Fri, 13 Jun 2025 12:58:36 +0200 Subject: [PATCH 2/3] chore: changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b8394caf..8793a595c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,7 @@ All notable changes to this project will be documented in this file. - vector: Bump to `0.47.0` ([#1152]). - zookeeper: backport ZOOKEEPER-4846, ZOOKEEPER-4921, ZOOKEEPER-4925 into Zookeeper 3.9.3 ([#1150]). - testing-tools: Update base image ([#1165]). +- trino: Enable custom versions ([#1168]). ### Fixed @@ -188,6 +189,7 @@ All notable changes to this project will be documented in this file. [#1157]: https://github.com/stackabletech/docker-images/pull/1157 [#1163]: https://github.com/stackabletech/docker-images/pull/1163 [#1165]: https://github.com/stackabletech/docker-images/pull/1165 +[#1168]: https://github.com/stackabletech/docker-images/pull/1168 ## [25.3.0] - 2025-03-21 From 8491513469a8effb46b64ef29c1108a934df3e78 Mon Sep 17 00:00:00 2001 From: dervoeti Date: Tue, 17 Jun 2025 12:39:11 +0200 Subject: [PATCH 3/3] fix: directory names / storage plugin location --- trino/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/trino/Dockerfile b/trino/Dockerfile index b06190f58..459ec02a4 100644 --- a/trino/Dockerfile +++ b/trino/Dockerfile @@ -35,10 +35,10 @@ microdnf clean all rm -rf /var/cache/yum EOF -COPY --from=trino-builder --chown=${STACKABLE_USER_UID}:0 /stackable/trino-server /stackable/trino-server +COPY --from=trino-builder --chown=${STACKABLE_USER_UID}:0 /stackable/trino-server /stackable/trino-server-${PRODUCT}-stackable${RELEASE} COPY --chown=${STACKABLE_USER_UID}:0 trino/licenses /licenses -COPY --from=trino-storage-connector-image --chown=${STACKABLE_USER_UID}:0 /stackable/src/trino-storage-connector/patchable-work/worktree/${PRODUCT}/target/trino-storage-${PRODUCT}-stackable${RELEASE} /stackable/trino-server-${PRODUCT}-stackable${RELEASE}/plugin/trino-storage-${PRODUCT} +COPY --from=trino-storage-connector-image --chown=${STACKABLE_USER_UID}:0 /stackable/src/trino-storage-connector/patchable-work/worktree/${PRODUCT}/target/trino-storage-${PRODUCT}-stackable${RELEASE} /stackable/trino-server-${PRODUCT}-stackable${RELEASE}/plugin/trino-storage-${PRODUCT}-stackable${RELEASE} COPY --from=trino-storage-connector-image --chown=${STACKABLE_USER_UID}:0 /stackable/src/trino-storage-connector/patchable-work/worktree/${PRODUCT}/target/bom.json /stackable/trino-server-${PRODUCT}-stackable${RELEASE}/plugin/trino-storage-${PRODUCT}-stackable${RELEASE}/trino-storage-${PRODUCT}-stackable${RELEASE}.cdx.json COPY --from=trino-storage-connector-image --chown=${STACKABLE_USER_UID}:0 /stackable/trino-storage-connector-${PRODUCT}-stackable${RELEASE}-src.tar.gz /stackable @@ -49,9 +49,10 @@ RUN <