Repository navigation
Open-API: Stage REST fixture runtime JARs for Docker - #16214
Conversation
9261ef1 to
f2ee703
Compare
|
this is ready for first round of review. Please take a look at once those are good, please check |
|
I'm wondering whether we need all those jars and bundles for docker image and integration tests in iceberg-python and iceberg-rust. |
adfc237 to
31831d0
Compare
40d608b to
5d3b794
Compare
a0e2845 to
33b9c5c
Compare
33b9c5c to
f291147
Compare
899981e to
1cd4a96
Compare
|
After this, I will follow up with more PRs to
|
…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]>
d54d785 to
50f0b05
Compare
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]>
Revert eb20d81 at the user’s request, restoring the prior REST fixture packaging. Generated-by: GitHub Copilot Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
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.
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]>
| # | ||
| # Trivy ignore file for the OpenAPI test-fixtures runtime. | ||
| # | ||
| vulnerabilities: |
There was a problem hiding this comment.
to pass cve scan, same as
iceberg/.github/trivyignore/kafka-connect-runtime.trivyignore.yaml
Lines 20 to 25 in 83bf0ff
| 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/ |
There was a problem hiding this comment.
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/ |
There was a problem hiding this comment.
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
| group = 'build' | ||
| into layout.buildDirectory.dir('rest-fixture-runtime') | ||
| from configurations.testFixturesRuntimeClasspath | ||
| from tasks.named('testFixturesJar') |
There was a problem hiding this comment.
im purposely leaving out pruning deps. will do that in a follow up PR
|
Thanks @Fokko, I'll follow up with more PRs to prune what goes into the docker image and then the LICENSE/NOTICE files |
Instead of bundling everything into a shaded uber-JAR (
:iceberg-open-api:shadowJar), this PR stagestestFixturesJarand its runtime dependencies as individual JARs via:iceberg-open-api:stageRESTFixtureRuntime, which theiceberg-rest-fixtureDocker image copies into/usr/lib/iceberg-rest/libs/and runs on the classpath (libs/*).For context, Docker publishing was paused over
LICENSE/NOTICEissues (see #18421 and #18877).This is the first step of the plan to fix
iceberg-rest-fixturepackaging and licensing.Follow-up PRs will prune the runtime dependencies (and drop the redundant cloud bundle fat JARs), add
runtime-deps.txt, and reconcileopen-api/LICENSEandopen-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: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-fixturesFull list of 273 staged JARs
AI Disclosure
gemini-4-argon)