Skip to content

gha: retry temporary cache errors - #2911

Merged
sylvestre merged 1 commit into
mozilla:mainfrom
codeandsolder:upstream-pr/gha-retry-temporary-errors
Nov 3, 2026
Merged

sylvestre merged 1 commit into
mozilla:mainfrom
codeandsolder:upstream-pr/gha-retry-temporary-errors

Conversation

@codeandsolder

Copy link
Copy Markdown
Contributor

Fixes #2821.

Summary

  • add OpenDAL's retry layer to the GitHub Actions cache backend
  • retry only errors OpenDAL marks temporary
  • use jitter, six retry opportunities, and an 8-second maximum retry delay
  • keep the retry dependency optional and gated by the existing gha feature

The retry bounds follow the live Retry-After behavior reported in the issue while avoiding retries for persistent errors.

Validation

  • full Rust 1.99 library suite: 575 passed, 0 failed
  • Rust 1.99 --no-default-features --features gha check
  • cargo fmt, locked dependency resolution, and git diff --check
  • Mozilla Rust 1.91 exact CI Clippy gate passes

@codecov-commenter

codecov-commenter commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.54%. Comparing base (dac6c80) to head (b7e896d).

Files with missing lines Patch % Lines
src/cache/gha.rs 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2911      +/-   ##
==========================================
- Coverage   78.54%   78.54%   -0.01%     
==========================================
  Files          74       74              
  Lines       44039    44044       +5     
==========================================
+ Hits        34591    34594       +3     
- Misses       9448     9450       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread Cargo.toml Resolved
Comment thread src/cache/gha.rs Resolved
@codeandsolder-git-wrangler
codeandsolder-git-wrangler Bot force-pushed the upstream-pr/gha-retry-temporary-errors branch from d32c525 to b7e896d Compare October 28, 2026 06:53
@sylvestre

Copy link
Copy Markdown
Collaborator

feels like very long time between retries, it is probably faster just to rebuild the file

@codeandsolder

Copy link
Copy Markdown
Contributor Author

Probably faster for a single file, yeah, but the standard GitHub actions runners have 3-4 cores, I would assume if they have something else to build, which isn't unlikely, in the meantime you still come out measurably ahead, we could check for that I guess but I'm not sure it's worth the complexity, or shorten the time limit

@sylvestre
sylvestre merged commit 433585d into mozilla:main Nov 3, 2026
51 checks passed
@sylvestre

Copy link
Copy Markdown
Collaborator

Thanks for your PR

@codeandsolder-git-wrangler
codeandsolder-git-wrangler Bot deleted the upstream-pr/gha-retry-temporary-errors branch November 23, 2026 18:38
bug-ops added a commit to bug-ops/pjs that referenced this pull request Nov 23, 2026
sccache v0.20.0 (mozilla/sccache#2911) added OpenDAL RetryLayer (up to 6 retries, 8s max backoff) to the GHA cache backend. During parallel CI bursts, 429 rate limits on the startup .sccache_check read/write probe now block daemon startup past sccache's hardcoded 10s client startup timeout, failing builds, doctests, and coverage jobs with 'Timed out waiting for server startup'.

Set SCCACHE_SKIP_CACHE_CHECK=true in the CI workflow env so the daemon starts immediately without probing .sccache_check, and pin SCCACHE_VERSION=v0.20.0 across all mozilla-actions/sccache-action steps alongside the other CI tool pins.
CGMossa added a commit to A2-ai/miniextendr that referenced this pull request Nov 23, 2026
…e limits

The cause of #2396 lives in sccache: the GHA retry layer added in
mozilla/sccache#2911 (v0.20.0) also covers the server's startup cache
check, so under HTTP 429 the server outlasts the client's 10 s wait.
No upstream issue exists; the note is named after the PR that introduced
the behaviour and records the workaround (the pin, or
SCCACHE_SKIP_CACHE_CHECK=true) and when it can go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
CGMossa added a commit to A2-ai/miniextendr that referenced this pull request Nov 23, 2026
…ache rate limits (#2397)

* ci: pin sccache to 0.19.0; 0.20.0 times out starting its server

sccache-action installs the latest sccache release unless a version is
given. sccache 0.20.0 was released 2026-11-23 07:08 UTC. Since then
Rust-compiling jobs fail at random at `rustc -vV` with "Timed out
waiting for server startup": all 11 failed jobs in the runs of #2393,
#2382 and #2378 on 97075aa failed this way, on 0.20.0.

The server logs (SCCACHE_ERROR_LOG) show why. At startup the server
reads and writes `.sccache_check` in the GitHub Actions cache, and the
cache API answered 429 (rate limit exceeded). 0.20.0 wraps the GHA
backend in a retry layer (mozilla/sccache#2911: six retries, up to 8 s
apart), which covers that check, so the server is still retrying when
the client gives up after 10 s. 0.19.0 has no retry layer: a
rate-limited check starts the server at once (read-only for the job if
the write failed). The rate limiting most likely comes from bursts of runs
on a cold cache: the cache namespace carries sccache's version, so
0.20.0 started from an empty cache.

Pin version: "v0.19.0" on every sccache-action step (ci.yml x14,
gctorture-nightly.yml x1). Tracked in #2396.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(upstream): sccache #3026 is released in 0.20.0; CI pins 0.19.0

v0.20.0 includes mozilla/sccache#3026, which the Windows job waits for
before it sets RUSTC_WRAPPER=sccache again. CI now pins v0.19.0 (#2396),
so that wait now runs through #2396 too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(upstream): record sccache 0.20.0's startup timeout under GHA rate limits

The cause of #2396 lives in sccache: the GHA retry layer added in
mozilla/sccache#2911 (v0.20.0) also covers the server's startup cache
check, so under HTTP 429 the server outlasts the client's 10 s wait.
No upstream issue exists; the note is named after the PR that introduced
the behaviour and records the workaround (the pin, or
SCCACHE_SKIP_CACHE_CHECK=true) and when it can go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

ghac: cache writes are dropped on HTTP 429 because GHACache::build installs no RetryLayer

3 participants