You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/11/09 02:20:06 UTC

[GitHub] [beam] Abacn commented on a diff in pull request #24040: Improving stale container cleanup script

Abacn commented on code in PR #24040:
URL: https://github.com/apache/beam/pull/24040#discussion_r1017336866


##########
.test-infra/tools/stale_dataflow_prebuilt_image_cleaner.sh:
##########
@@ -19,15 +19,37 @@
 #
 set -euo pipefail
 
-STALE_IMAGES=$(gcloud container images list-tags \
-gcr.io/apache-beam-testing/prebuilt_beam_sdk/beam_python_prebuilt_sdk \
---sort-by=TIMESTAMP  --filter="timestamp.datetime < $(date --iso-8601=s -d '1 day ago')" \
---format="get(digest)")
+REPOSITORIES=(prebuilt_beam_sdk/beam_python_prebuilt_sdk beam-sdk beam_portability)
 
-if [[ ${STALE_IMAGES} ]]; then
-  for digest in ${STALE_IMAGES}; do
-    gcloud container images delete gcr.io/apache-beam-testing/prebuilt_beam_sdk/beam_python_prebuilt_sdk@"$digest" --force-delete-tags -q
+echo $REPOSITORIES
+
+for repository in ${REPOSITORIES[@]}; do
+  echo IMAGES FOR REPO ${repository}
+  IMAGE_NAMES+=$(gcloud container images list --repository=gcr.io/apache-beam-testing/${repository} --format="get(name)")

Review Comment:
   ```suggestion
     IMAGE_NAMES+=$(gcloud container images list --repository=gcr.io/apache-beam-testing/${repository} --format="get(name)")
     IMAGE_NAMES+=" "
   ```



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org