Skip to content

[codex] Use async Artifact Registry image cleanup - #120

Merged
Pigbibi merged 1 commit into
mainfrom
codex/async-artifact-cleanup
May 31, 2026
Merged

[codex] Use async Artifact Registry image cleanup#120
Pigbibi merged 1 commit into
mainfrom
codex/async-artifact-cleanup

Conversation

@Pigbibi

@Pigbibi Pigbibi commented May 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • make the post-deploy Artifact Registry image cleanup asynchronous
  • avoid failing deploy workflows when delete operations are issued but operation polling is not available

Validation

  • git diff --check

@Pigbibi
Pigbibi marked this pull request as ready for review May 31, 2026 09:01
@Pigbibi
Pigbibi merged commit 0eea7e5 into main May 31, 2026
1 check passed
@Pigbibi
Pigbibi deleted the codex/async-artifact-cleanup branch May 31, 2026 09:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a37bbd8db8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

gcloud artifacts docker images delete "${image_repo}@${digest}" \
--project="${GCP_PROJECT_ID}" \
--delete-tags \
--async \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wait for asynchronous image deletes to finish

In this cleanup loop, adding --async means the workflow exits after each delete operation is submitted rather than after Artifact Registry reports that it completed; the gcloud reference for this flag says it returns immediately without waiting for the operation. When Artifact Registry later rejects a delete (for example a digest that fails a precondition or another backend-side delete error), this step still finishes green, so old Cloud Run images remain in the repository and cleanup regressions are hidden from CI. Please either wait on the returned operations or keep the synchronous delete so failures still fail the workflow.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant