FrankChen021 commented on code in PR #20734:
URL: https://github.com/apache/druid/pull/20734#discussion_r4400671998


##########
.github/scripts/pull_docker_images:
##########
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# 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.
+
+# Pulls every Docker image declared via DruidCI.cacheDockerImage("<image>") in 
Java sources.
+
+set -eu
+
+CALL='DruidCI\.cacheDockerImage\('
+
+if git grep -nE "$CALL" -- '*.java' | grep -vE "$CALL\"[^\"]+\"\)"; then
+  echo "::error ::DruidCI.cacheDockerImage must be called with a string 
literal"
+  exit 1
+fi
+
+for image in $(git grep -hoE "$CALL\"[^\"]+\"" -- '*.java' | grep -oE 
'"[^"]+"' | tr -d '"' | sort -u); do

Review Comment:
   [P3] Redpanda image omitted from derived pre-pulls
   
   **Finding:** This extractor only collects images passed through 
`DruidCI.cacheDockerImage(...)`, but `SchemaRegistryResource` still constructs 
a `RedpandaContainer` from the literal 
`docker.redpanda.com/redpandadata/redpanda:v25.3.5`. The normal Kafka and 
Kinesis data-format tests use that resource, so their image is not warmed by 
this script and must still be pulled on demand.
   
   **Suggestion:** Annotate the schema-registry image with 
`DruidCI.cacheDockerImage(...)`, or broaden the discovery contract to cover all 
regular Testcontainers image declarations.



-- 
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]

Reply via email to