Skip to content

Open-API: Stage REST fixture runtime JARs for Docker - #16214

Merged
kevinjqliu merged 12 commits into
apache:mainfrom
kevinjqliu:kevinjqliu/open-api
Nov 11, 2026
Merged

kevinjqliu merged 12 commits into
apache:mainfrom
kevinjqliu:kevinjqliu/open-api

Conversation

@kevinjqliu

@kevinjqliu kevinjqliu commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Instead of bundling everything into a shaded uber-JAR (:iceberg-open-api:shadowJar), this PR stages testFixturesJar and its runtime dependencies as individual JARs via :iceberg-open-api:stageRESTFixtureRuntime, which the iceberg-rest-fixture Docker image copies into /usr/lib/iceberg-rest/libs/ and runs on the classpath (libs/*).

For context, Docker publishing was paused over LICENSE/NOTICE issues (see #18421 and #18877).

This is the first step of the plan to fix iceberg-rest-fixture packaging and licensing.

Follow-up PRs will prune the runtime dependencies (and drop the redundant cloud bundle fat JARs), add runtime-deps.txt, and reconcile open-api/LICENSE and open-api/NOTICE.

What goes into the Docker Image

:iceberg-open-api:stageRESTFixtureRuntime's output. Follow up PR will trim this.

Currently stages 273 JARs into open-api/build/rest-fixture-runtime:

  • 13 Iceberg JARs: iceberg-api, iceberg-common, iceberg-core, iceberg-core-tests, iceberg-aws, iceberg-aws-bundle, iceberg-azure, iceberg-azure-bundle, iceberg-gcp, iceberg-gcp-bundle, iceberg-bigquery, iceberg-bundled-guava, iceberg-open-api-test-fixtures
  • 260 third-party runtime & transitive JARs:** AWS SDK v2, Azure SDK + Reactor/Netty, Google Cloud SDK + gRPC/Protobuf/OpenTelemetry/Arrow, Hadoop 3.4.3, Jetty 12.1.14, Jackson 2.22.4, SQLite JDBC, SLF4J, JUnit 5, Commons, Avro, Caffeine, RoaringBitmap, etc.
Full list of 273 staged JARs
RoaringBitmap-1.6.29.jar
aircompressor-2.0.3.jar
analyticsaccelerator-s3-1.3.1.jar
animal-sniffer-annotations-1.27.jar
annotations-2.57.8.jar
annotations-4.1.1.4.jar
apache5-client-2.57.8.jar
api-common-2.71.0.jar
arns-2.57.8.jar
arrow-format-17.0.0.jar
arrow-memory-core-17.0.0.jar
arrow-memory-netty-17.0.0.jar
arrow-memory-netty-buffer-patch-17.0.0.jar
arrow-vector-17.0.0.jar
auth-2.57.8.jar
auto-value-annotations-1.11.1.jar
avro-1.12.2.jar
aws-core-2.57.8.jar
aws-crt-0.49.0.jar
aws-json-protocol-2.57.8.jar
aws-query-protocol-2.57.8.jar
aws-s3-accessgrants-java-plugin-2.5.0.jar
aws-xml-protocol-2.57.8.jar
azure-core-1.60.0.jar
azure-core-http-netty-1.16.8.jar
azure-identity-1.18.7.jar
azure-json-1.5.1.jar
azure-security-keyvault-keys-4.11.3.jar
azure-storage-blob-12.36.0.jar
azure-storage-common-12.35.0.jar
azure-storage-file-datalake-12.29.0.jar
azure-storage-internal-avro-12.21.0.jar
azure-xml-1.2.1.jar
bcprov-jdk18on-1.86.jar
caffeine-3.3.1.jar
checker-compat-qual-2.5.6.jar
checker-qual-3.49.0.jar
checksums-2.57.8.jar
checksums-spi-2.57.8.jar
client-1.6.0.jar
cloudwatch-2.57.8.jar
cloudwatch-metric-publisher-2.57.8.jar
common-0.13.0.jar
common-1.6.0.jar
commons-codec-1.19.0.jar
commons-collections4-4.4.jar
commons-compress-1.28.0.jar
commons-configuration2-2.10.1.jar
commons-io-2.20.0.jar
commons-lang3-3.20.0.jar
commons-logging-1.3.0.jar
commons-math3-3.6.1.jar
commons-net-3.9.0.jar
commons-text-1.14.0.jar
conscrypt-openjdk-uber-2.6.2.jar
crt-core-2.57.8.jar
detector-resources-support-0.36.0.jar
dynamodb-2.57.8.jar
endpoints-spi-2.57.8.jar
error_prone_annotations-2.50.0.jar
eventstream-2.57.8.jar
exporter-metrics-0.36.0.jar
failsafe-3.3.2.jar
failureaccess-1.0.3.jar
flatbuffers-java-24.3.25.jar
gapic-google-cloud-storage-v2-2.76.0.jar
gax-2.88.0.jar
gax-grpc-2.88.0.jar
gax-httpjson-2.88.0.jar
gcs-analytics-core-1.6.0.jar
glue-2.57.8.jar
google-api-client-2.9.2.jar
google-api-services-bigquery-v2-rev20260731-2.0.0.jar
google-api-services-storage-v1-rev20260524-2.0.0.jar
google-auth-library-credentials-1.55.0.jar
google-auth-library-oauth2-http-1.55.0.jar
google-cloud-bigquery-2.74.0.jar
google-cloud-bigquerystorage-3.36.0.jar
google-cloud-core-2.78.0.jar
google-cloud-core-grpc-2.78.0.jar
google-cloud-core-http-2.78.0.jar
google-cloud-kms-2.103.0.jar
google-cloud-monitoring-3.101.0.jar
google-cloud-storage-2.76.0.jar
google-cloud-storage-control-2.76.0.jar
google-http-client-2.2.0.jar
google-http-client-apache-v2-2.2.0.jar
google-http-client-appengine-2.2.0.jar
google-http-client-gson-2.2.0.jar
google-http-client-jackson2-2.2.0.jar
google-oauth-client-1.39.0.jar
grpc-alts-1.83.0.jar
grpc-api-1.83.0.jar
grpc-auth-1.83.0.jar
grpc-context-1.83.0.jar
grpc-core-1.83.0.jar
grpc-google-cloud-bigquerystorage-v1-3.36.0.jar
grpc-google-cloud-bigquerystorage-v1beta1-3.36.0.jar
grpc-google-cloud-bigquerystorage-v1beta2-3.36.0.jar
grpc-google-cloud-storage-control-v2-2.76.0.jar
grpc-google-cloud-storage-v2-2.76.0.jar
grpc-googleapis-1.83.0.jar
grpc-grpclb-1.83.0.jar
grpc-inprocess-1.83.0.jar
grpc-netty-shaded-1.83.0.jar
grpc-opentelemetry-1.83.0.jar
grpc-protobuf-1.83.0.jar
grpc-protobuf-lite-1.83.0.jar
grpc-rls-1.83.0.jar
grpc-services-1.83.0.jar
grpc-stub-1.83.0.jar
grpc-util-1.83.0.jar
grpc-xds-1.83.0.jar
gson-2.14.0.jar
guava-33.7.2-jre.jar
hadoop-annotations-3.4.3.jar
hadoop-auth-3.4.3.jar
hadoop-common-3.4.3.jar
hadoop-shaded-guava-1.5.0.jar
hadoop-shaded-protobuf_3_25-1.5.0.jar
http-auth-2.57.8.jar
http-auth-aws-2.57.8.jar
http-auth-aws-crt-2.57.8.jar
http-auth-aws-eventstream-2.57.8.jar
http-auth-spi-2.57.8.jar
http-client-spi-2.57.8.jar
httpclient-4.5.14.jar
httpclient5-5.6.5.jar
httpcore-4.4.16.jar
httpcore5-5.4.4.jar
httpcore5-h2-5.4.4.jar
iam-2.57.8.jar
iceberg-api-1.13.0-SNAPSHOT.jar
iceberg-aws-1.13.0-SNAPSHOT.jar
iceberg-aws-bundle-1.13.0-SNAPSHOT.jar
iceberg-azure-1.13.0-SNAPSHOT.jar
iceberg-azure-bundle-1.13.0-SNAPSHOT.jar
iceberg-bigquery-1.13.0-SNAPSHOT.jar
iceberg-bundled-guava-1.13.0-SNAPSHOT.jar
iceberg-common-1.13.0-SNAPSHOT.jar
iceberg-core-1.13.0-SNAPSHOT-tests.jar
iceberg-core-1.13.0-SNAPSHOT.jar
iceberg-gcp-1.13.0-SNAPSHOT.jar
iceberg-gcp-bundle-1.13.0-SNAPSHOT.jar
iceberg-open-api-1.13.0-SNAPSHOT-test-fixtures.jar
identity-spi-2.57.8.jar
j2objc-annotations-3.1.jar
jackson-annotations-2.22.jar
jackson-core-2.22.4.jar
jackson-databind-2.22.4.jar
jackson-dataformat-xml-2.22.4.jar
jackson-datatype-jsr310-2.22.4.jar
jakarta.activation-api-1.2.1.jar
jakarta.servlet-api-6.0.0.jar
javax.annotation-api-1.3.2.jar
javax.servlet-api-3.1.0.jar
jettison-1.5.4.jar
jetty-compression-common-12.1.14.jar
jetty-compression-gzip-12.1.14.jar
jetty-compression-server-12.1.14.jar
jetty-ee10-servlet-12.1.14.jar
jetty-http-12.1.14.jar
jetty-io-12.1.14.jar
jetty-security-12.1.14.jar
jetty-server-12.1.14.jar
jetty-session-12.1.14.jar
jetty-util-12.1.14.jar
jna-5.17.0.jar
jna-platform-5.17.0.jar
json-20250517.jar
json-utils-2.57.8.jar
jsp-api-2.1.jar
jspecify-1.0.1.jar
junit-jupiter-5.14.4.jar
junit-jupiter-api-5.14.4.jar
junit-jupiter-engine-5.14.4.jar
junit-jupiter-params-5.14.4.jar
junit-platform-commons-1.14.4.jar
junit-platform-engine-1.14.4.jar
kms-2.57.8.jar
lakeformation-2.57.8.jar
listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
metrics-spi-2.57.8.jar
msal4j-1.26.0.jar
msal4j-persistence-extension-1.3.0.jar
netty-buffer-4.2.19.Final.jar
netty-codec-4.2.19.Final.jar
netty-codec-base-4.2.19.Final.jar
netty-codec-compression-4.2.19.Final.jar
netty-codec-dns-4.2.19.Final.jar
netty-codec-http-4.2.19.Final.jar
netty-codec-http2-4.2.19.Final.jar
netty-codec-marshalling-4.2.19.Final.jar
netty-codec-protobuf-4.2.19.Final.jar
netty-codec-socks-4.2.19.Final.jar
netty-common-4.2.19.Final.jar
netty-handler-4.2.19.Final.jar
netty-handler-proxy-4.2.19.Final.jar
netty-nio-client-2.57.8.jar
netty-resolver-4.2.19.Final.jar
netty-resolver-dns-4.2.19.Final.jar
netty-resolver-dns-classes-macos-4.2.19.Final.jar
netty-resolver-dns-native-macos-4.2.19.Final-osx-x86_64.jar
netty-tcnative-boringssl-static-2.0.84.Final.jar
netty-tcnative-classes-2.0.84.Final.jar
netty-transport-4.2.19.Final.jar
netty-transport-classes-epoll-4.2.19.Final.jar
netty-transport-classes-kqueue-4.2.19.Final.jar
netty-transport-native-epoll-4.2.19.Final-linux-x86_64.jar
netty-transport-native-epoll-4.2.19.Final.jar
netty-transport-native-kqueue-4.2.19.Final-osx-x86_64.jar
netty-transport-native-unix-common-4.2.19.Final.jar
nimbus-jose-jwt-10.4.jar
opencensus-api-0.31.1.jar
opencensus-contrib-http-util-0.31.1.jar
opentelemetry-api-1.63.0.jar
opentelemetry-common-1.63.0.jar
opentelemetry-context-1.63.0.jar
opentelemetry-exporter-logging-1.63.0.jar
opentelemetry-gcp-resources-1.54.0-alpha.jar
opentelemetry-sdk-1.63.0.jar
opentelemetry-sdk-common-1.63.0.jar
opentelemetry-sdk-extension-autoconfigure-spi-1.63.0.jar
opentelemetry-sdk-logs-1.63.0.jar
opentelemetry-sdk-metrics-1.63.0.jar
opentelemetry-sdk-trace-1.63.0.jar
opentelemetry-semconv-1.32.0.jar
opentelemetry-semconv-incubating-1.32.0-alpha.jar
opentest4j-1.3.0.jar
perfmark-api-0.27.0.jar
profiles-2.57.8.jar
proto-google-cloud-bigquerystorage-v1-3.36.0.jar
proto-google-cloud-bigquerystorage-v1alpha-3.36.0.jar
proto-google-cloud-bigquerystorage-v1beta-3.36.0.jar
proto-google-cloud-bigquerystorage-v1beta1-3.36.0.jar
proto-google-cloud-bigquerystorage-v1beta2-3.36.0.jar
proto-google-cloud-kms-v1-2.103.0.jar
proto-google-cloud-monitoring-v3-3.101.0.jar
proto-google-cloud-storage-control-v2-2.76.0.jar
proto-google-cloud-storage-v2-2.76.0.jar
proto-google-common-protos-2.79.0.jar
proto-google-iam-v1-1.74.0.jar
protobuf-0.13.0.jar
protobuf-java-4.33.6.jar
protobuf-java-util-4.33.6.jar
protocol-core-2.57.8.jar
re2j-1.8.jar
reactive-streams-1.0.4.jar
reactor-core-3.7.19.jar
reactor-netty-core-1.2.18.jar
reactor-netty-http-1.2.18.jar
regions-2.57.8.jar
retries-2.57.8.jar
retries-spi-2.57.8.jar
runtime-0.13.0.jar
s3-2.57.8.jar
s3control-2.57.8.jar
sdk-core-2.57.8.jar
shared-resourcemapping-0.36.0.jar
slf4j-api-2.0.18.jar
slf4j-simple-2.0.18.jar
smithy-rpcv2-protocol-2.57.8.jar
sqlite-jdbc-3.54.1.0.jar
sso-2.57.8.jar
stax2-api-4.3.0.jar
sts-2.57.8.jar
third-party-jackson-core-2.57.8.jar
third-party-jackson-dataformat-cbor-2.57.8.jar
threeten-extra-1.8.0.jar
threetenbp-1.7.0.jar
utils-2.57.8.jar
utils-lite-2.57.8.jar
woodstox-core-7.2.0.jar

AI Disclosure

  • Model: Gemini 4 Argon (gemini-4-argon)
  • Platform/Tool: GitHub Copilot
  • Human Oversight: [unknown - human to fill in]
  • Prompt Summary: Simplify REST fixture runtime staging for Docker and scope PR to Step 1 of the REST fixture packaging plan

@kevinjqliu
kevinjqliu force-pushed the kevinjqliu/open-api branch from 9261ef1 to f2ee703 Compare May 6, 2026 22:06
@kevinjqliu kevinjqliu changed the title Open-API: Slim down REST fixture shadow JAR and externalize cloud bundles Open-API: Replace shadow JAR with distribution plugin for REST fixture May 6, 2026
@kevinjqliu
kevinjqliu marked this pull request as ready for review May 7, 2026 01:49
@kevinjqliu

Copy link
Copy Markdown
Contributor Author

this is ready for first round of review.

Please take a look at build.gradle, .github/workflows/publish-iceberg-rest-fixture-docker.yml, docker/iceberg-rest-fixture/Dockerfile
and then open-api/runtime-deps.txt and runtime-deps.gradle

once those are good, please check open-api/LICENSE and open-api/NOTICE

@manuzhang

Copy link
Copy Markdown
Member

I'm wondering whether we need all those jars and bundles for docker image and integration tests in iceberg-python and iceberg-rust.

@kevinjqliu
kevinjqliu force-pushed the kevinjqliu/open-api branch from adfc237 to 31831d0 Compare June 7, 2026 23:40
@github-actions github-actions Bot added docs and removed OPENAPI labels Jun 7, 2026
@kevinjqliu
kevinjqliu force-pushed the kevinjqliu/open-api branch from 40d608b to 5d3b794 Compare June 8, 2026 00:49
@kevinjqliu kevinjqliu changed the title Open-API: Replace shadow JAR with distribution plugin for REST fixture Open-API: Drop runtime jar; stage REST fixture image via Gradle Jun 8, 2026
@kevinjqliu
kevinjqliu force-pushed the kevinjqliu/open-api branch 4 times, most recently from a0e2845 to 33b9c5c Compare June 8, 2026 21:27
@kevinjqliu kevinjqliu changed the title Open-API: Drop runtime jar; stage REST fixture image via Gradle Open-API: Drop shadowJar; stage REST fixture image classpath via Gradle Jun 8, 2026
@kevinjqliu kevinjqliu changed the title Open-API: Drop shadowJar; stage REST fixture image classpath via Gradle Open-API: Drop bundled runtime jar; build REST fixture Docker image from staged classpath Jun 8, 2026
@kevinjqliu
kevinjqliu force-pushed the kevinjqliu/open-api branch from 33b9c5c to f291147 Compare June 8, 2026 21:31
@kevinjqliu kevinjqliu changed the title Open-API: Drop bundled runtime jar; build REST fixture Docker image from staged classpath Open-API: Stop publishing REST fixture runtime jar Jun 17, 2026
@kevinjqliu
kevinjqliu force-pushed the kevinjqliu/open-api branch from 899981e to 1cd4a96 Compare June 27, 2026 20:27
@kevinjqliu

Copy link
Copy Markdown
Contributor Author

After this, I will follow up with more PRs to

  1. Prune as many unnecessary dependencies as possible from the rest fixture image
  2. Fix the LICENSE/NOTICE file

kevinjqliu and others added 9 commits November 10, 2026 12:55
…rom staged classpath

Replaces the iceberg-open-api shadowJar with a Sync task that lays out the REST catalog test-fixtures runtime as a directory of jars plus LICENSE/NOTICE under build/iceberg-rest-server/. The iceberg-rest-fixture Docker image copies that directory and launches the server via java -cp ".../libs/*" org.apache.iceberg.rest.RESTCatalogServer. The publish-iceberg-rest-fixture-docker and cve-scan workflows are updated to run the new installRESTServer task; the open-api CVE scan entry now scans every dependency jar individually.
Document the required cloud bundles and explicit staging lifecycle, reuse archive metadata handling for test fixtures, and keep dependency pruning and the license audit separate from the packaging change.

Generated-by: GitHub Copilot

Co-authored-by: Copilot App <[email protected]>
@kevinjqliu kevinjqliu reopened this Nov 10, 2026
@kevinjqliu kevinjqliu changed the title Open-API: Stop publishing REST fixture runtime jar Open-API: Stage REST fixture runtime dependencies for Docker Nov 10, 2026
@kevinjqliu kevinjqliu removed the stale label Nov 10, 2026
Reuse cloud bundle dependency declarations as loose runtime JARs, following the Kafka Connect distribution, rather than staging shaded bundles alongside their unshaded dependencies. Cover unique SDK class definitions and ADLS FileIO initialization to prevent the Azure linkage regression.

Generated-by: GitHub Copilot

Co-authored-by: Copilot App <[email protected]>
@kevinjqliu
kevinjqliu marked this pull request as draft November 10, 2026 22:57
Revert eb20d81 at the user’s request, restoring the prior REST fixture packaging.

Generated-by: GitHub Copilot

Co-authored-by: Copilot App <[email protected]>
@Fokko
Fokko self-requested a review November 11, 2026 08:41

@Fokko Fokko left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kevinjqliu! Nice follow-up on the agreed packaging plan 🚀 I checked out the branch and ran the staging task locally: 274 jars under libs/, Guava 33.7.2, LICENSE/NOTICE alongside, and the Kafka Connect-style SDK copying matches the existing pattern in kafka-connect/build.gradle.

Comment thread .github/workflows/cve-scan.yml Resolved
@kevinjqliu kevinjqliu changed the title Open-API: Stage REST fixture runtime dependencies for Docker Open-API: Stage REST fixture runtime JARs for Docker Nov 11, 2026
Scope stageRESTFixtureRuntime to staging the runtime JARs under open-api/build/rest-fixture-runtime, drop LICENSE/NOTICE changes for follow-up PRs, simplify cve-scan JAR copying, and add the hadoop-shaded-guava Trivy ignore.

Generated-by: GitHub Copilot

Co-authored-by: Copilot App <[email protected]>
@github-actions github-actions Bot removed the OPENAPI label Nov 11, 2026
#
# Trivy ignore file for the OpenAPI test-fixtures runtime.
#
vulnerabilities:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to pass cve scan, same as

vulnerabilities:
# guava CVE shaded into hadoop-shaded-guava 1.5.0 (guava 33.4.8), only fixed in
# guava >= 33.7.2. No newer hadoop-shaded-guava release exists yet.
- id: CVE-2026-102554
paths:
- "**/hadoop-shaded-guava-1.5.0.jar"

unzip ${{ matrix.scan-path }}/*.zip -d /tmp/cve-scan
else
cp ${{ matrix.scan-path }}/iceberg-${{ matrix.distribution }}-*.jar /tmp/cve-scan/
cp ${{ matrix.scan-path }}/*.jar /tmp/cve-scan/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so it matches the jars produced by :iceberg-open-api:stageRESTFixtureRuntime

# Copy runtime files directly to the target location
COPY --chown=iceberg:iceberg open-api/build/libs/iceberg-open-api-test-fixtures-runtime-*.jar /usr/lib/iceberg-rest/iceberg-rest-adapter.jar
# Copy runtime JARs staged by ./gradlew :iceberg-open-api:stageRESTFixtureRuntime
COPY --chown=iceberg:iceberg open-api/build/rest-fixture-runtime/ /usr/lib/iceberg-rest/libs/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the glue.

moves the jars built by :iceberg-open-api:stageRESTFixtureRuntime and saved in open-api/build/rest-fixture-runtime/ to /usr/lib/iceberg-rest/libs/ which docker/iceberg-rest-fixture/entrypoint.sh then reference

Comment thread build.gradle
group = 'build'
into layout.buildDirectory.dir('rest-fixture-runtime')
from configurations.testFixturesRuntimeClasspath
from tasks.named('testFixturesJar')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im purposely leaving out pruning deps. will do that in a follow up PR

@kevinjqliu
kevinjqliu marked this pull request as ready for review November 11, 2026 19:01
@kevinjqliu
kevinjqliu merged commit ab8a86d into apache:main Nov 11, 2026
45 checks passed
@kevinjqliu
kevinjqliu deleted the kevinjqliu/open-api branch November 11, 2026 19:28
@kevinjqliu

Copy link
Copy Markdown
Contributor Author

Thanks @Fokko, I'll follow up with more PRs to prune what goes into the docker image and then the LICENSE/NOTICE files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants