Repository navigation
fix(ci): retry the ccache download on a signed-URL expiry (#6062) - #6063
Conversation
) GitHub serves release assets via a short-lived signed redirect, which intermittently expires before the transfer starts and fails the Tier 2 build with urllib.error.HTTPError: HTTP Error 618: jwt:expired. A rerun passes. RED: test_expired_signed_redirect_is_retried_against_the_original_url fakes one 618 then a successful download. On the old single urlretrieve it failed with the real HTTPError, because the expired hop was never retried. GREEN: add download_with_retry(), which re-requests the original github.com release URL on each of up to 4 attempts (so every attempt gets a fresh signed redirect) with 0.5 s exponential backoff, retries only HTTP 618, and re-raises other failures immediately. install() still verifies SHA-256 before extraction. Tests also pin the exhausted-retry backoff sequence and that a 404 is not retried.
zackees
left a comment
There was a problem hiding this comment.
Coordinator review: LGTM, and thanks for the quick fix for #6062. Each retry re-requests the original release URL, so GitHub issues a fresh signed redirect, and the SHA-256 check is unchanged. The two self-tests pin the behaviour: one 618 and then a success, and a persistent 618 that surfaces the original error after ATTEMPTS, with backoff of 0.5, 1 and 2 s. I've approved your held runs, and it'll queue once green.
|
Coordinator: An |
…obs-rust#6062) The test-created HTTPError objects own a temporary file wrapper, and the repo turns ResourceWarning into a failure (obs-rust#2235): the 404 and the persistent 618 re-raised by the helper were never closed. Register addCleanup(failure.close) for both. Verified with -W error::ResourceWarning (the 5 tests pass; only the two pre-existing Windows-only errors remain).
Head branch was pushed to by a user without write access
|
Fixed in Verified with warnings as errors: The 404 in the warning is the fabricated error, not a real request: every path calls the patched One correction for the rerun command: New head |
GitHub serves release assets via a short-lived signed redirect, which intermittently expires before the transfer starts and fails the Tier 2 build with urllib.error.HTTPError: HTTP Error 618: jwt:expired. A rerun passes.
RED: test_expired_signed_redirect_is_retried_against_the_original_url fakes one 618 then a successful download. On the old single urlretrieve it failed with the real HTTPError, because the expired hop was never retried.
GREEN: add download_with_retry(), which re-requests the original github.com release URL on each of up to 4 attempts (so every attempt gets a fresh signed redirect) with 0.5 s exponential backoff, retries only HTTP 618, and re-raises other failures immediately. install() still verifies SHA-256 before extraction. Tests also pin the exhausted-retry backoff sequence and that a 404 is not retried.