Skip to content

ci: tier2_front_cache.py's ccache download fails on GitHub's signed-URL 'HTTP Error 618: jwt:expired' without retrying #6062

Done

Description

@zackees

ci/tier2_front_cache.py downloads the pinned ccache 4.14.3 release asset with one urllib.request.urlretrieve(URL, archive). GitHub serves release assets by redirecting to a short-lived signed URL. When that hop fails with HTTP Error 618: jwt:expired, the Rust Tier 2 Linux 🐧 (build) job fails, and the merge queue ejects the PR or its check goes red.

This happened three times on 2026-11-30/12-01:

Each time, a rerun passes.

Traceback:

File "ci/tier2_front_cache.py", line 33, in install
    urllib.request.urlretrieve(URL, archive)
urllib.error.HTTPError: HTTP Error 618: jwt:expired

Fix: retry the download a few times with backoff. Each attempt has to re-request the original github.com/.../releases/download URL, so a fresh signed redirect is issued. Keep the SHA-256 check, and add a self-test that fakes one 618 and then a success. Caching the archive under the job's persistent cache would also remove the network hop on warm runners.

Activity

  1. added
    bug
    on Dec 1, 2026
  2. KelboLive commented on Dec 1, 2026

    @KelboLive
    Contributor

    Claiming: investigation. The fix is a bounded retry around the download, re-requesting the original github.com/.../releases/download URL on every attempt so GitHub issues a fresh signed redirect; the SHA-256 check stays. Plus a self-test that fakes one 618 and then a success. One PR.

  3. KelboLive commented on Dec 1, 2026

    @KelboLive
    Contributor

    /ready

    Investigation complete: ci/tier2_front_cache.py:33 is a single urlretrieve; the 618 comes from the signed redirect hop, and retrying the original URL gets a fresh redirect. Retry with backoff, keep the SHA-256 check, add a RED/GREEN self-test. No workflow change.

  4. added
    needs-investigation
    on Dec 1, 2026
  5. added
    ready
    and removed
    needs-investigation
    on Dec 1, 2026
  6. KelboLive commented on Dec 1, 2026

    @KelboLive
    Contributor

    Claiming: #6062 — implement the retry now.

    1. ci/tier2_front_cache.py: factor the download into a bounded retry that re-requests the original URL each attempt (fresh signed redirect), with short exponential backoff; keep the SHA-256 verification.
    2. RED/GREEN: a self-test that raises HTTPError 618 on the first attempt and succeeds on the second.
    3. One PR; no workflow change.
  7. KelboLive commented on Dec 1, 2026

    @KelboLive
    Contributor

    PR opened: #6063 (head 875cbed).

    • download_with_retry() re-requests the original release URL on each of up to 4 attempts (fresh signed redirect each time), 0.5 s exponential backoff (worst case 3.5 s), retries only HTTP 618, re-raises anything else. The SHA-256 check and extraction are unchanged.
    • RED: the new test fakes one 618 then success; against the old single urlretrieve it failed with the real HTTPError: HTTP Error 618: jwt:expired.
    • GREEN: 5/5 targeted tests pass; ruff clean; the lint lane passes.
    • Note: the module has two pre-existing Windows-only test errors (platform.machine() == "AMD64" and a cp1252 YAML read); both reproduce on unmodified master and are outside this issue. CI runs the module on Linux.
  8. moved this from In progress to Ready in obs-rust Multiviewon Dec 3, 2026
  9. rdoupe commented on Dec 5, 2026

    @rdoupe
    Collaborator

    Fixed by #6063 (merged 2026-12-01): download_with_retry is on master in ci/tier2_front_cache.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugready

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions