kevinjqliu commented on code in PR #16214:
URL: https://github.com/apache/iceberg/pull/16214#discussion_r4541988837
##########
.github/workflows/cve-scan.yml:
##########
@@ -194,7 +195,7 @@ jobs:
if [ "${{ matrix.unpack }}" = "true" ]; then
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/
Review Comment:
so it matches the jars produced by
`:iceberg-open-api:stageRESTFixtureRuntime`
##########
docker/iceberg-rest-fixture/Dockerfile:
##########
@@ -30,8 +30,8 @@ RUN set -xeu && \
# Working directory for the application
WORKDIR /usr/lib/iceberg-rest
-# 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/
Review 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
##########
build.gradle:
##########
@@ -1219,16 +1216,12 @@ project(':iceberg-open-api') {
}
check.dependsOn('validateRESTCatalogSpec')
- shadowJar {
- archiveBaseName.set("iceberg-open-api-test-fixtures-runtime")
- archiveClassifier.set(null)
- configurations = [project.configurations.testFixturesRuntimeClasspath]
- from sourceSets.testFixtures.output
- zip64 true
-
- manifest {
- attributes 'Main-Class': 'org.apache.iceberg.rest.RESTCatalogServer'
- }
+ tasks.register('stageRESTFixtureRuntime', Sync) {
+ description = 'Stages the REST fixture runtime JARs'
+ group = 'build'
+ into layout.buildDirectory.dir('rest-fixture-runtime')
+ from configurations.testFixturesRuntimeClasspath
+ from tasks.named('testFixturesJar')
Review Comment:
im purposely leaving out pruning deps. will do that in a follow up PR
##########
.github/trivyignore/open-api-test-fixtures-runtime.trivyignore.yaml:
##########
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# Trivy ignore file for the OpenAPI test-fixtures runtime.
+#
+vulnerabilities:
Review Comment:
to pass cve scan, same as
https://github.com/apache/iceberg/blob/83bf0ffab77bb45468348fa3f1e9f0e5801e4f62/.github/trivyignore/kafka-connect-runtime.trivyignore.yaml#L20-L25
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]