Skip to content

Warn on GHCR delete failures for >5000-downloads error#491

Merged
ianpittwood merged 1 commit into
mainfrom
bugfix/warn-on-versions-with-more-than-5000-downloads-delete-failure
Apr 24, 2026
Merged

Warn on GHCR delete failures for >5000-downloads error#491
ianpittwood merged 1 commit into
mainfrom
bugfix/warn-on-versions-with-more-than-5000-downloads-delete-failure

Conversation

@ianpittwood
Copy link
Copy Markdown
Contributor

Summary

  • GitHub intermittently returns Publicly visible package versions with more than 5000 downloads cannot be deleted. when cleaning package versions that do not actually meet that threshold, failing bakery clean cache-registry / bakery clean temp-registry in CI.
  • GHCRClient.delete_package_versions now 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.
  • Added a focused unit test module (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.py passes (4 tests)
  • uv run pytest test/config/test_config.py -k clean still passes (13 tests, no regressions)
  • Observe next scheduled clean.yml run in a product repo to confirm the flaky message no longer fails the workflow

🤖 Generated with Claude Code

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>
@ianpittwood ianpittwood requested a review from bschwedler as a code owner April 24, 2026 19:38
@ianpittwood ianpittwood enabled auto-merge April 24, 2026 19:42
@github-actions
Copy link
Copy Markdown

Test Results

1 392 tests  +4   1 392 ✅ +4   8m 20s ⏱️ -2s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit d34103a. ± Comparison against base commit 225fd15.

@ianpittwood ianpittwood added this pull request to the merge queue Apr 24, 2026
Merged via the queue into main with commit 009b8f2 Apr 24, 2026
22 checks passed
@ianpittwood ianpittwood deleted the bugfix/warn-on-versions-with-more-than-5000-downloads-delete-failure branch April 24, 2026 19:58
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.

2 participants