Warn on GHCR delete failures for >5000-downloads error#491
Merged
ianpittwood merged 1 commit intoApr 24, 2026
Merged
Conversation
GitHub intermittently returns "more than 5000 downloads cannot be deleted" when cleaning public package versions that do not actually have 5000+ downloads. Treat that specific message as a warning in GHCRClient.delete_package_versions so flaky responses don't fail CI; the next cleanup run typically succeeds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bschwedler
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Publicly visible package versions with more than 5000 downloads cannot be deleted.when cleaning package versions that do not actually meet that threshold, failingbakery clean cache-registry/bakery clean temp-registryin CI.GHCRClient.delete_package_versionsnow detects that specific message, logs it as a warning, and does not include it in the returned errors list — so the CLI exits 0 and the next cleanup run picks up the stragglers.test/registry_management/ghcr/test_api.py) covering the suppression path, generic failure path, and mixed-results case.Test plan
uv run pytest test/registry_management/ghcr/test_api.pypasses (4 tests)uv run pytest test/config/test_config.py -k cleanstill passes (13 tests, no regressions)clean.ymlrun in a product repo to confirm the flaky message no longer fails the workflow🤖 Generated with Claude Code