Prune old Cloud Run revisions after env sync - #102
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb2c769513
ℹ️ 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".
| if item.get("revisionName") and int(item.get("percent") or 0) > 0 | ||
| } |
There was a problem hiding this comment.
Keep tagged revisions during prune
The keep-set only includes traffic targets with percent > 0, so revisions that are reachable only via a traffic tag (0% rollout) are treated as deletable. Cloud Run documentation states tagged revisions can be tested while serving 0% traffic and also that revisions that are able to receive traffic cannot be deleted; in that case gcloud run revisions delete will fail and this workflow step will start failing for services that keep tagged canary/test revisions. Include tagged revisions (or otherwise detect tag entries) in keep_revisions before deletion.
Useful? React with 👍 / 👎.
Summary
Verification