FrankChen021 commented on code in PR #20734: URL: https://github.com/apache/druid/pull/20734#discussion_r4388818776
########## .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 + docker pull --quiet "$image" || echo "::warning ::docker pull $image failed" Review Comment: [P2] Retry transient Docker pulls **Finding:** Each derived image is pulled only once, and any registry or network error is converted into a warning. A transient failure therefore loses the previous three-attempt, 10-second-backoff behavior and can make the parallel unit-test jobs flaky or force every Testcontainers invocation to re-pull the image. **Suggestion:** Keep a bounded retry/backoff loop for each discovered image, or fail the warm-up step explicitly when a required pull cannot succeed. -- 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]
