From 7756dbbd364f718f8ce0c3e8270ca6970ca03966 Mon Sep 17 00:00:00 2001 From: Xenia Date: Thu, 5 Sep 2024 13:46:55 +0200 Subject: [PATCH] chore(trino): Add 455 (#822) * chore(trino): Add 455 * add changelog * fix changelog references * bump trino-cli version & add changelog * quote name as recommended in SC2215 --- CHANGELOG.md | 7 ++++++- trino-cli/versions.py | 2 +- trino/Dockerfile | 36 +++++------------------------------- trino/versions.py | 22 ++++++---------------- 4 files changed, 18 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9458db67..bee6014bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ All notable changes to this project will be documented in this file. - airflow: Add version `2.9.3` ([#809]). - kafka: Add version `3.8.0` ([#813]). - hive: Add version `4.0.0` ([#818]). +- trino: Add version `455` ([#822]). +- trino-cli: Add version `455` ([#822]). ### Removed @@ -18,6 +20,8 @@ All notable changes to this project will be documented in this file. - vector: Remove version `0.39.0` ([#802]). - airflow: Remove versions `2.6.3`, `2.8.1`, `2.8.4` ([#809]). - kafka: Remove versions `3.4.1`, `3.6.1`, `3.6.2` ([#813]). +- trino: Remove versions `414`, `442` ([#822]). +- trino-cli: Remove version `451` ([#822]). ### Fixed @@ -29,6 +33,7 @@ All notable changes to this project will be documented in this file. [#811]: https://github.com/stackabletech/docker-images/pull/811 [#813]: https://github.com/stackabletech/docker-images/pull/813 [#818]: https://github.com/stackabletech/docker-images/pull/818 +[#822]: https://github.com/stackabletech/docker-images/pull/822 ## [24.7.0] - 2024-07-24 @@ -72,6 +77,7 @@ All notable changes to this project will be documented in this file. - hbase: Remove the symlink `/stackable/jmx/jmx_prometheus_javaagent-0.16.1.jar` which is unused since SDP 23.11 ([#621]). - hive: Only build and ship Hive metastore. This reduces the image size from `2.63GB` to `1.9GB` and should also reduce the number of dependencies ([#619], [#622]). +- ubi8-rust-builder: Bump `protoc` from `21.5` to `26.1` ([#624]). - pass platform argument to preflight check ([#626]). - nifi: provision stackable-bcrypt from Maven ([#663]) - nifi: move /bin/stackable-bcrypt to /stackable/stackable-bcrypt and added softlink for backwards compatibility ([#678]). @@ -363,7 +369,6 @@ All notable changes to this project will be documented in this file. [#419]: https://github.com/stackabletech/docker-images/pull/419 [#425]: https://github.com/stackabletech/docker-images/pull/425 [#429]: https://github.com/stackabletech/docker-images/pull/429 -[#429]: https://github.com/stackabletech/docker-images/pull/429 [#431]: https://github.com/stackabletech/docker-images/pull/431 [#433]: https://github.com/stackabletech/docker-images/pull/433 [#434]: https://github.com/stackabletech/docker-images/pull/434 diff --git a/trino-cli/versions.py b/trino-cli/versions.py index 321b4c86e..b6d60aa4a 100644 --- a/trino-cli/versions.py +++ b/trino-cli/versions.py @@ -1,6 +1,6 @@ versions = [ { - "product": "451", + "product": "455", "java-base": "22", }, ] diff --git a/trino/Dockerfile b/trino/Dockerfile index 394e888f2..c78f7fd31 100644 --- a/trino/Dockerfile +++ b/trino/Dockerfile @@ -7,43 +7,22 @@ ARG STORAGE_CONNECTOR WORKDIR /stackable RUN curl --fail -L "https://repo.stackable.tech/repository/packages/trino-storage/trino-storage-${STORAGE_CONNECTOR}-src.tar.gz" | tar -xzC . -RUN --mount=type=cache,target=/root/.m2/repository cd trino-storage-${STORAGE_CONNECTOR}-src && \ +RUN "--mount=type=cache,target=/root/.m2/repository" cd trino-storage-${STORAGE_CONNECTOR}-src && \ # Upstream builds are marked as -SNAPSHOT, even for release builds mvn versions:set -DnewVersion=${STORAGE_CONNECTOR} && \ - mvn package -DskipTests -Dmaven.gitcommitid.skip=true - -# # TODO: remove the OPA authorizer builder once Trino versions 414 and 428 are removed -FROM stackable/image/java-devel AS opa-authorizer-builder - -ARG PRODUCT -ARG OPA_AUTHORIZER - -WORKDIR /stackable - -RUN if [ -n "${OPA_AUTHORIZER}" ]; then \ - curl --fail -L "https://repo.stackable.tech/repository/packages/trino-opa-authorizer/trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER}-src.tar.gz" | tar -xzC .; \ - fi -RUN --mount=type=cache,target=/root/.m2/repository if [ -n "${OPA_AUTHORIZER}" ]; then \ - cd trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER}-src && \ - mvn package -DskipTests; \ - fi - -# Create an empty dummy plugin folder for newer versions that don't need the plugin anymore -RUN mkdir -p trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER}-src/target/out + # We need to use ./mvnw instead of mvn to get a recent maven version (which is required to build Trino) + ./mvnw package -DskipTests -Dmaven.gitcommitid.skip=true FROM stackable/image/java-devel AS builder ARG PRODUCT -# External OPA authorizer only required for 414 and 428, included in 438 -# The `OPA_AUTHORIZER` is not set in the conf.py for version 438 to remove the ARG as soon as 414 and 428 are removed -ARG OPA_AUTHORIZER ARG STORAGE_CONNECTOR WORKDIR /stackable RUN curl --fail -L "https://repo.stackable.tech/repository/packages/trino-server/trino-server-${PRODUCT}-src.tar.gz" | tar -xzC . -RUN --mount=type=cache,target=/root/.m2/repository cd "trino-server-${PRODUCT}-src" && \ +RUN "--mount=type=cache,target=/root/.m2/repository" cd "trino-server-${PRODUCT}-src" && \ # We need to use ./mvnw instead of mvn to get a recent maven version (which is required to build Trino) ./mvnw package -DskipTests -Dmaven.gitcommitid.skip=true --projects="!docs,!core/trino-server-rpm" && \ # Delete the worst intermediate build products to free some space @@ -56,11 +35,6 @@ RUN --mount=type=cache,target=/root/.m2/repository cd "trino-server-${PRODUCT}-s rm -r /stackable/trino-server-${PRODUCT}-src COPY --from=storage-connector-builder /stackable/trino-storage-${STORAGE_CONNECTOR}-src/target/trino-storage-${STORAGE_CONNECTOR} /stackable/trino-server-${PRODUCT}/plugin/trino-storage-${STORAGE_CONNECTOR} -# # TODO: remove the following COPY statement once Trino versions 414 and 428 are removed -COPY --from=opa-authorizer-builder /stackable/trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER}-src/target/out /stackable/trino-server-${PRODUCT}/plugin/trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER} -# We have no way to copy a folder conditionally, so delete the opa authorizer folder if no version is selected -# Otherwise Trino will crash since empty plugin folders are not allowed -RUN [ -n "${OPA_AUTHORIZER}" ] || rmdir /stackable/trino-server-${PRODUCT}/plugin/trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER} # For earlier versions this script removes the .class file that contains the # vulnerable code. @@ -86,7 +60,7 @@ ARG JMX_EXPORTER WORKDIR /stackable RUN curl --fail -L "https://repo.stackable.tech/repository/packages/jmx-exporter/jmx_prometheus-${JMX_EXPORTER}-src.tar.gz" | tar -xzC . -RUN --mount=type=cache,target=/root/.m2/repository cd jmx_prometheus-${JMX_EXPORTER}-src && \ +RUN "--mount=type=cache,target=/root/.m2/repository" cd jmx_prometheus-${JMX_EXPORTER}-src && \ mvn package FROM stackable/image/java-base diff --git a/trino/versions.py b/trino/versions.py index c60b9365a..354b25811 100644 --- a/trino/versions.py +++ b/trino/versions.py @@ -1,26 +1,16 @@ versions = [ { - "product": "414", - "java-base": "17", - "java-devel": "17", - "opa_authorizer": "stackable0.2.0", - "jmx_exporter": "1.0.1", - "storage_connector": "413", - }, - { - "product": "442", - "java-base": "21", - "java-devel": "21", + "product": "451", + "java-base": "22", + "java-devel": "22", "jmx_exporter": "1.0.1", - "storage_connector": "442", - "opa_authorizer": "", + "storage_connector": "451", }, { - "product": "451", + "product": "455", "java-base": "22", "java-devel": "22", "jmx_exporter": "1.0.1", - "storage_connector": "451", - "opa_authorizer": "", + "storage_connector": "455", }, ]