scripts: delete-quay-tags.sh#570
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughA new Bash script ChangesQuay Tag Cleanup Utility
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/delete-quay-tags.sh`:
- Around line 149-152: The dry-run path in the deletion loop is incorrectly
incrementing the real deleted counter, which causes the checkpoint and summary
in delete-quay-tags.sh to report items as deleted when no DELETE request was
made. Update the logic around the DRY_RUN branch so the dry-run output remains
separate from the actual deletion count, and only increment deleted in the
non-dry-run path where the real deletion happens. Use the existing deleted
counter and DRY_RUN condition in the main tag-deletion loop to locate the fix.
- Around line 153-163: The Quay tag deletion request in the main loop is missing
timeout protection, so a stalled curl call can block the whole cleanup flow.
Update the delete request in the tag-processing block that uses http_code and
curl to include both a connect timeout and an overall max-time timeout, and keep
the existing success/failure handling unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9e5eecfe-66de-4cff-b25b-4e042f2fee3a
📒 Files selected for processing (2)
README.mdscripts/delete-quay-tags.sh
Signed-off-by: Eguzki Astiz Lezaun <eastizle@redhat.com>
|
This looks good, im thinking do we want to automate this or is having tags expire be enough. Are a lot of tags being created? |
|
Having tags expire should be enough. But this script is handy eventually for cleaning up transient tags that never expire |
Description
scripts/delete-quay-tags.shdeletes transient tags fromquay.io/kuadrant/console-plugin, keeping onlylatestand semantic version tags (e.g.v0.5.0).The best approach is to create expiration tags on created images. WIP in #525
In the meantime, some scripting that can be helpful.
Been used in https://quay.io/repository/kuadrant/console-plugin
Details
Summary by CodeRabbit
New Features
latestand semantic-version tags (optionally prefixed withv), while removing transient tags.Documentation