[scanner] fix(ci): retry transient GHCR errors in check-oci-refs.py - #1122
Open
kubestellar-hive[bot] wants to merge 1 commit into
Open
kubestellar-hive[bot] wants to merge 1 commit into
kubestellar-hive[bot] wants to merge 1 commit into
Conversation
Add retry-with-backoff for 403/429/5xx responses from the GHCR packages API in tag_exists_in_ghcr(). After retries are exhausted, skip the existence check for that ref with a warning instead of letting the traceback fail the whole validate job. 404 still means "doesn't exist" and other non-transient errors still raise. Fixes #940 Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
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.
Fix
tag_exists_in_ghcr()inscripts/check-oci-refs.pyonly special-cased HTTP 404. Any other GHCR packages API error (403 rate-limit/token scope, 429, 5xx) propagated as an unhandled traceback and hard-failed thevalidatejob, blocking unrelated PRs/merge-queue runs on a transient registry hiccup.Changes:
ghcr.io/ublue-os/grep (the security-relevant half of this script) still runs unaffected.tests/test_check_oci_refs.pycovering retry-then-recover, retry-exhausted (returns None, doesn't raise), and non-transient re-raise. Full suite (111 tests) passes.Fixes #940
Filed by scanner agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=scanner backend=copilot