This is an automated email from the ASF dual-hosted git repository.

yhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new a6b147a8184 Fix cleanUpDockerJavaImages fail (#27287)
a6b147a8184 is described below

commit a6b147a818448ab42145d8df5b08182532355324
Author: Yi Hu <[email protected]>
AuthorDate: Wed Jun 28 15:56:28 2023 -0400

    Fix cleanUpDockerJavaImages fail (#27287)
---
 .../google-cloud-dataflow-java/scripts/cleanup_untagged_gcr_images.sh  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/runners/google-cloud-dataflow-java/scripts/cleanup_untagged_gcr_images.sh 
b/runners/google-cloud-dataflow-java/scripts/cleanup_untagged_gcr_images.sh
index 5bf8197f8f9..67ee242ee0d 100755
--- a/runners/google-cloud-dataflow-java/scripts/cleanup_untagged_gcr_images.sh
+++ b/runners/google-cloud-dataflow-java/scripts/cleanup_untagged_gcr_images.sh
@@ -27,6 +27,7 @@ echo "${DIGESTS}" | while read -r digest; do
   if [[ ! -z "${digest}" ]]; then
     img="${IMAGE_NAME}@${digest}"
     echo "Removing untagged image ${img}"
-    gcloud container images delete --quiet "${img}"
+    # Tolerate 404 as tags may target to same image and already removed.
+    DELETE_RESULT="$(gcloud container images delete --quiet "${img}" 2>&1)" || 
[[ "$DELETE_RESULT" == *"'status': 404"* ]]
   fi
 done

Reply via email to