Skip to content

feat: Add Trino 475 #1063

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 1f5f2f18056f650b89f0399c188e3446975e1764 Mon Sep 17 00:00:00 2001
From: Lukas Voetmand <[email protected]>
Date: Fri, 6 Sep 2024 17:53:52 +0200
Subject: Add CycloneDX plugin

---
pom.xml | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

diff --git a/pom.xml b/pom.xml
index ddd620e..bbfcb96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -545,6 +545,23 @@
</dependency>
</dependencies>
</plugin>
+ <plugin>
+ <groupId>org.cyclonedx</groupId>
+ <artifactId>cyclonedx-maven-plugin</artifactId>
+ <version>2.9.1</version>
+ <configuration>
+ <projectType>application</projectType>
+ <schemaVersion>1.6</schemaVersion>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>makeBom</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
2 changes: 2 additions & 0 deletions trino-storage-connector/stackable/patches/475/patchable.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
upstream = "https://github.com/snowlift/trino-storage.git"
base = "976514ad62ed5e147fbc63a31803a268a1d240c4"
4 changes: 4 additions & 0 deletions trino-storage-connector/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@
"product": "470",
"java-devel": "23",
},
{
"product": "475",
"java-devel": "23",
},
]
10 changes: 8 additions & 2 deletions trino/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FROM stackable/image/trino-storage-connector AS trino-storage-connector-image
FROM stackable/image/java-devel AS trino-builder

ARG PRODUCT
ARG TRINO_STORAGE_CONNECTOR
ARG STACKABLE_USER_UID
ARG JMX_EXPORTER

Expand All @@ -26,8 +27,8 @@ RUN curl "https://repo.stackable.tech/repository/packages/trino-server/trino-ser

COPY --chown=${STACKABLE_USER_UID}:0 trino/stackable/patches/apply_patches.sh /stackable/trino-server-${PRODUCT}-src/patches/apply_patches.sh
COPY --chown=${STACKABLE_USER_UID}:0 trino/stackable/patches/${PRODUCT} /stackable/trino-server-${PRODUCT}-src/patches/${PRODUCT}
COPY --chown=${STACKABLE_USER_UID}:0 --from=trino-storage-connector-image /stackable/trino-storage-${PRODUCT}-src/target/trino-storage-${PRODUCT} \
/stackable/trino-server-${PRODUCT}/plugin/trino-storage-${PRODUCT}/
COPY --chown=${STACKABLE_USER_UID}:0 --from=trino-storage-connector-image /stackable/trino-storage-${TRINO_STORAGE_CONNECTOR}-src/target/trino-storage-${TRINO_STORAGE_CONNECTOR} \
/stackable/trino-server-${PRODUCT}/plugin/trino-storage-${TRINO_STORAGE_CONNECTOR}/
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
Expand All @@ -49,7 +50,12 @@ git commit --allow-empty --message "Fake commit, so that we can create a tag"
git tag ${PRODUCT}

# We need to use ./mvnw instead of mvn to get a recent maven version (which is required to build Trino)
# trino-server-rpm was removed at some point of time
if [[ "$PRODUCT" == "451" || "$PRODUCT" == "455" || "$PRODUCT" == "470" ]]; then
./mvnw --batch-mode --no-transfer-progress package -DskipTests --projects="!docs,!core/trino-server-rpm"
else
./mvnw --batch-mode --no-transfer-progress package -DskipTests --projects="!docs"
fi

# Delete intermediate build products to free some space and keep runners happy
rm -r /stackable/trino-server-${PRODUCT}-src/plugin/*/target /stackable/trino-server-${PRODUCT}-src/core/trino-server/target/trino-server-${PRODUCT}
Expand Down
38 changes: 38 additions & 0 deletions trino/stackable/patches/475/0001-Add-CycloneDX-plugin.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 88bcb8d5ff689504f112b8b149a282a01e6b4212 Mon Sep 17 00:00:00 2001
From: Lukas Voetmand <[email protected]>
Date: Fri, 6 Sep 2024 17:53:52 +0200
Subject: Add CycloneDX plugin

---
pom.xml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/pom.xml b/pom.xml
index a1604d5ebec..3f9f7945046 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2814,6 +2814,24 @@
</excludes>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.cyclonedx</groupId>
+ <artifactId>cyclonedx-maven-plugin</artifactId>
+ <version>2.9.1</version>
+ <configuration>
+ <projectType>application</projectType>
+ <schemaVersion>1.6</schemaVersion>
+ <skipNotDeployed>false</skipNotDeployed>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>makeBom</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>

2 changes: 2 additions & 0 deletions trino/stackable/patches/475/patchable.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
upstream = "https://github.com/trinodb/trino.git"
base = "fd2b81e86ba1c288684746d0842c0ffc3a709598"
11 changes: 11 additions & 0 deletions trino/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,30 @@
"java-devel": "22",
"jmx_exporter": "1.1.0",
"trino-storage-connector": "451",
"trino_storage_connector": "451",
},
{
"product": "455",
"java-base": "22",
"java-devel": "22",
"jmx_exporter": "1.1.0",
"trino-storage-connector": "455",
"trino_storage_connector": "455",
},
{
"product": "470",
"java-base": "23",
"java-devel": "23",
"jmx_exporter": "1.1.0",
"trino-storage-connector": "470",
"trino_storage_connector": "470",
},
{
"product": "475",
"java-base": "23",
"java-devel": "23",
"jmx_exporter": "1.1.0",
"trino-storage-connector": "475",
"trino_storage_connector": "475",
},
]