Skip to content

fix(utils): retry GET on any non-success HEAD in async probe#189

Open
plusky wants to merge 1 commit into
openSUSE:masterfrom
plusky:fix/utils-probe-get-fallback
Open

fix(utils): retry GET on any non-success HEAD in async probe#189
plusky wants to merge 1 commit into
openSUSE:masterfrom
plusky:fix/utils-probe-get-fallback

Conversation

@plusky

@plusky plusky commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

What

check_repo_url_async only retried with GET when HEAD returned exactly
405, while the sync check_repo_url probes with GET (via urllib) from
the start. A repo whose server rejects HEAD with 400/401/403 (nginx
limit_except, WAFs, S3/proxy layers) but serves GET 200 was reported
dead by the async backend and live by the sync one. The async probe now
retries with GET on any non-success HEAD status, restoring backend
parity.

Verification

Full gate green (ruff format/check, ty, pytest: 552 passed, coverage
82.49%). The GET-retry regression is a single parametrized test over
400/401/403/404/405/500 HEAD statuses; the suse-layout fallback test
now fails both HEAD and GET on the first suffix and asserts the actual
probed URLs, so it genuinely pins the layout fallback again. Reviewed
by a fan-out adversarial code review; all confirmed findings addressed.

AI-assisted.

check_repo_url_async only retried with GET when HEAD returned 405,
so a repo whose server rejects HEAD with 400/401/403 (nginx
limit_except, WAFs, S3/proxy layers) but serves GET 200 was reported
dead, while the sync check_repo_url (a GET via urllib) reported it
live. Broaden the fallback to retry GET on any non-success HEAD
status, restoring backend parity.

Tests: the GET-retry regression is a single parametrized test over
400/401/403/404/405/500 HEAD statuses; the suse-layout test now fails
both HEAD and GET on the first suffix and asserts the probed URLs, so
it again pins the layout fallback; the both-4xx test accounts for the
extra GET probes.
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.

1 participant