Skip to content

gha: retry temporary cache errors - #2911

Open
codeandsolder wants to merge 1 commit into
mozilla:mainfrom
codeandsolder:upstream-pr/gha-retry-temporary-errors
Open

codeandsolder wants to merge 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.07%. Comparing base (1bd7432) to head (d32c525).
⚠️ Report is 1 commits behind head on main.

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.06%   78.07%           
=======================================
  Files          73       74    +1     
  Lines       43233    43272   +39     
=======================================
+ Hits        33749    33783   +34     
- Misses       9484     9489    +5     

☔ 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 Outdated
opendal = { version = "0.58.1", optional = true, default-features = false }
opendal-http-transport-reqwest = { version = "0.58.1", optional = true }
opendal-layer-logging = { version = "0.58.1", optional = true }
opendal-layer-retry = { version = "=0.58.1", optional = true }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why =0.58.1 here when the other opendal crates use 0.58.1?

Comment thread src/cache/gha.rs
.layer(
RetryLayer::new()
.with_jitter()
.with_max_times(6)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please add a one line comment on why 6 and 8s?
like: GitHub asks for Retry-After up to ~20s on 429

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