Skip to content
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file.
- opensearch: Scope CycloneDX SBOM to shipped components only, eliminating false positive CVEs from unshipped plugins ([#1452]).
- vector: Look for SBOM in correct location ([#1471]).
- vector: Use correct license ([#1476]).
- trino: Build a patched Airlift from source and depend on it to backport [airlift/airlift#1943](https://github.com/airlift/airlift/pull/1943), applying the configured max response header size to Jetty's `maxResponseHeaderSize` ([#1510]).

### Removed

Expand All @@ -40,6 +41,7 @@ All notable changes to this project will be documented in this file.
[#1481]: https://github.com/stackabletech/docker-images/pull/1481
[#1493]: https://github.com/stackabletech/docker-images/pull/1493
[#1509]: https://github.com/stackabletech/docker-images/pull/1509
[#1510]: https://github.com/stackabletech/docker-images/pull/1510

## [26.3.0] - 2026-03-16

Expand Down
39 changes: 39 additions & 0 deletions trino/airlift/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
# check=error=true

# We use a custom patched airlift version to fast track https://github.com/airlift/airlift/pull/1943
# This can be removed once the PR is merged and Trino makes use of the new Airlift version containing the fix

FROM local-image/java-devel AS airlift-builder

ARG PRODUCT_VERSION
ARG RELEASE_VERSION
ARG STACKABLE_USER_UID

WORKDIR /stackable

COPY --chown=${STACKABLE_USER_UID}:0 trino/airlift/stackable/patches/patchable.toml /stackable/src/trino/airlift/stackable/patches/patchable.toml
COPY --chown=${STACKABLE_USER_UID}:0 trino/airlift/stackable/patches/${PRODUCT_VERSION} /stackable/src/trino/airlift/stackable/patches/${PRODUCT_VERSION}

# hadolint ignore=SC2215
RUN --mount=type=cache,id=maven-airlift-${PRODUCT_VERSION},target=/root/.m2/repository <<EOF
cd "$(/stackable/patchable --images-repo-root=src checkout trino/airlift ${PRODUCT_VERSION})"

NEW_VERSION="${PRODUCT_VERSION}-stackable${RELEASE_VERSION}"

mvn versions:set -DnewVersion=$NEW_VERSION -DartifactId='*' -DgroupId='*' -DgenerateBackupPoms=false

mvn \
install \
-DskipTests \
-Dair.check.skip-all \
-Dcheckstyle.skip \
-Dmaven.javadoc.skip=true \
-Dmaven.gitcommitid.skip=true \
--projects='!sample-server,!skeleton-server'

mkdir -p /stackable/patched-libs/maven/io
cp -r /root/.m2/repository/io/airlift /stackable/patched-libs/maven/io

chmod --recursive g=u /stackable/patched-libs
EOF
5 changes: 5 additions & 0 deletions trino/airlift/boil-config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[versions."361".local-images]
java-devel = "24"

[versions."386".local-images]
java-devel = "25"
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 846dafacf01735c4eb507959f7b9456d8fe8ebdc Mon Sep 17 00:00:00 2001
From: Lukas Krug <lukas.krug@stackable.tech>
Date: Wed, 27 May 2026 21:58:48 +0200
Subject: Apply max response header size to Jetty maxResponseHeaderSize

---
.../src/main/java/io/airlift/http/server/HttpServer.java | 2 +-
.../src/main/java/io/airlift/http/server/HttpServerConfig.java | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/http-server/src/main/java/io/airlift/http/server/HttpServer.java b/http-server/src/main/java/io/airlift/http/server/HttpServer.java
index 6da8193ebe..5a8f4009bf 100644
--- a/http-server/src/main/java/io/airlift/http/server/HttpServer.java
+++ b/http-server/src/main/java/io/airlift/http/server/HttpServer.java
@@ -193,7 +193,7 @@ public class HttpServer
baseHttpConfiguration.setRequestHeaderSize(toIntExact(config.getMaxRequestHeaderSize().toBytes()));
}
if (config.getMaxResponseHeaderSize() != null) {
- baseHttpConfiguration.setResponseHeaderSize(toIntExact(config.getMaxResponseHeaderSize().toBytes()));
+ baseHttpConfiguration.setMaxResponseHeaderSize(toIntExact(config.getMaxResponseHeaderSize().toBytes()));
}
if (config.getOutputBufferSize() != null) {
baseHttpConfiguration.setOutputBufferSize(toIntExact(config.getOutputBufferSize().toBytes()));
diff --git a/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java b/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java
index c4ebbdf9d3..760f72347a 100644
--- a/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java
+++ b/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java
@@ -372,6 +372,7 @@ public class HttpServerConfig
return this;
}

+ @MaxDataSize("1GB")
public DataSize getMaxResponseHeaderSize()
{
return maxResponseHeaderSize;
2 changes: 2 additions & 0 deletions trino/airlift/stackable/patches/361/patchable.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mirror = "https://github.com/stackabletech/airlift.git"
base = "69314d3f2d3a72533704b8ef08d68b23875c5513"
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 359fe4dbf5154df20701cea742177bd874949009 Mon Sep 17 00:00:00 2001
From: Lukas Krug <lukas.krug@stackable.tech>
Date: Wed, 27 May 2026 21:58:48 +0200
Subject: Apply max response header size to Jetty maxResponseHeaderSize

---
.../src/main/java/io/airlift/http/server/HttpServer.java | 2 +-
.../src/main/java/io/airlift/http/server/HttpServerConfig.java | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/http-server/src/main/java/io/airlift/http/server/HttpServer.java b/http-server/src/main/java/io/airlift/http/server/HttpServer.java
index 49a7de9374..fe3fa345aa 100644
--- a/http-server/src/main/java/io/airlift/http/server/HttpServer.java
+++ b/http-server/src/main/java/io/airlift/http/server/HttpServer.java
@@ -204,7 +204,7 @@ public class HttpServer
baseHttpConfiguration.setRequestHeaderSize(toIntExact(config.getMaxRequestHeaderSize().toBytes()));
}
if (config.getMaxResponseHeaderSize() != null) {
- baseHttpConfiguration.setResponseHeaderSize(toIntExact(config.getMaxResponseHeaderSize().toBytes()));
+ baseHttpConfiguration.setMaxResponseHeaderSize(toIntExact(config.getMaxResponseHeaderSize().toBytes()));
}
if (config.getOutputBufferSize() != null) {
baseHttpConfiguration.setOutputBufferSize(toIntExact(config.getOutputBufferSize().toBytes()));
diff --git a/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java b/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java
index ee53d470f6..3abbfeaabb 100644
--- a/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java
+++ b/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java
@@ -387,6 +387,7 @@ public class HttpServerConfig
return this;
}

+ @MaxDataSize("1GB")
public DataSize getMaxResponseHeaderSize()
{
return maxResponseHeaderSize;
2 changes: 2 additions & 0 deletions trino/airlift/stackable/patches/386/patchable.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mirror = "https://github.com/stackabletech/airlift.git"
base = "edaccb04be472282c74507af9b7c38470b385685"
2 changes: 2 additions & 0 deletions trino/airlift/stackable/patches/patchable.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
upstream = "https://github.com/airlift/airlift.git"
default-mirror = "https://github.com/stackabletech/airlift.git"
8 changes: 8 additions & 0 deletions trino/trino/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
# check=error=true
FROM local-image/trino/airlift AS airlift-builder

FROM local-image/java-devel AS trino-builder

ARG PRODUCT_VERSION
ARG RELEASE_VERSION
ARG STACKABLE_USER_UID
ARG TRINO_AIRLIFT_VERSION

WORKDIR /stackable

COPY --chown=${STACKABLE_USER_UID}:0 trino/trino/stackable/patches/patchable.toml /stackable/src/trino/trino/stackable/patches/patchable.toml
COPY --chown=${STACKABLE_USER_UID}:0 trino/trino/stackable/patches/${PRODUCT_VERSION} /stackable/src/trino/trino/stackable/patches/${PRODUCT_VERSION}
COPY --chown=${STACKABLE_USER_UID}:0 --from=airlift-builder /stackable/patched-libs /stackable/patched-libs

# 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_VERSION},target=/root/.m2/repository <<EOF
cd "$(/stackable/patchable --images-repo-root=src checkout trino/trino ${PRODUCT_VERSION})"

# Make Maven aware of the patched Airlift artifacts before resolving deps
cp -r /stackable/patched-libs/maven/* /root/.m2/repository

NEW_VERSION="${PRODUCT_VERSION}-stackable${RELEASE_VERSION}"

mvn versions:set -DnewVersion=$NEW_VERSION
Expand Down Expand Up @@ -49,6 +56,7 @@ mvn \
-Dcheckstyle.skip `# Skip checkstyle checks. We dont care if the code is properly formatted, it just wastes time` \
-Dmaven.javadoc.skip=true `# Dont generate javadoc` \
-Ddep.presto-jdbc-under-test=${NEW_VERSION} \
-Ddep.airlift.version=${TRINO_AIRLIFT_VERSION}-stackable${RELEASE_VERSION} `# Use Stackable-patched Airlift; see local-image/trino/airlift` \
--projects="$SKIP_PROJECTS"

mkdir -p /stackable/patched-libs/maven/io
Expand Down
6 changes: 6 additions & 0 deletions trino/trino/boil-config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
[versions."477".local-images]
java-devel = "24"
# Airlift version comes from <dep.airlift.version> in
# https://github.com/trinodb/trino/blob/477/pom.xml
"trino/airlift" = "361"
Comment thread
sbernauer marked this conversation as resolved.

[versions."479".local-images]
java-devel = "25"
# Airlift version comes from <dep.airlift.version> in
# https://github.com/trinodb/trino/blob/479/pom.xml
"trino/airlift" = "386"
Loading