Skip to content

CI: Include Rust toolchain version in cargo cache keys to prevent cache poisoning#5182

Closed
RishavTiwari25 wants to merge 1 commit intoboa-dev:mainfrom
RishavTiwari25:ci/add-rustc-version-to-cache-key
Closed

CI: Include Rust toolchain version in cargo cache keys to prevent cache poisoning#5182
RishavTiwari25 wants to merge 1 commit intoboa-dev:mainfrom
RishavTiwari25:ci/add-rustc-version-to-cache-key

Conversation

@RishavTiwari25
Copy link
Copy Markdown

@RishavTiwari25 RishavTiwari25 commented Mar 20, 2026

This Pull Request fixes/closes #5181 .

It changes the following:

  • Injected a Get rust_version step (rustc -V) in 6 workflow files (rust.yml, webassembly.yml, test262.yml, test262_release.yml, nightly_build.yml, and pull_request.yml) to capture the exact active Rust compiler version.
  • Updated 15 actions/cache key strings to include -${{ steps.rust_version.outputs.version }}-, ensuring Cargo caches are strongly segregated by Rust compiler version, which prevents cross-version cache poisoning and silent linkage failures.

@github-actions github-actions bot added Waiting On Review Waiting on reviews from the maintainers C-Tests Issues and PRs related to the tests. C-Builtins PRs and Issues related to builtins/intrinsics C-Actions Pull requests that update Github Actions code and removed Waiting On Review Waiting on reviews from the maintainers labels Mar 20, 2026
@github-actions github-actions bot added this to the v1.0.0 milestone Mar 20, 2026
@github-actions
Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 50,126 50,126 0
Ignored 2,025 2,025 0
Failed 812 812 0
Panics 0 0 0
Conformance 94.64% 94.64% 0.00%

Tested main commit: be4cde434e03a9b3b117dc1f39ae394efffdfb54
Tested PR commit: 7ccbb00ddafb5c96dce81e8f7741e019d34aeb09
Compare commits: be4cde4...7ccbb00

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.80%. Comparing base (6ddc2b4) to head (7ccbb00).
⚠️ Report is 902 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5182       +/-   ##
===========================================
+ Coverage   47.24%   59.80%   +12.55%     
===========================================
  Files         476      582      +106     
  Lines       46892    63414    +16522     
===========================================
+ Hits        22154    37923    +15769     
- Misses      24738    25491      +753     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jedel1043
Copy link
Copy Markdown
Member

Audited all uses of actions/checkout across the CI pipeline and upgraded any remaining outdated SHAs to the consistent actions/checkout@de0fac2 # v6 used elsewhere in the repo.

Deleted this part of the description since there were no updates related to this

@jedel1043 jedel1043 added the A-Meta Issues and PRs related to the repository itself label Mar 20, 2026
@jedel1043
Copy link
Copy Markdown
Member

I don't think we need this. Rustc will already evict the old cache if it detects that our dependencies were built with an older version of rustc, which effectively updates our cache to the latest rustc version.

If we merged this, we would instead increase our cache usage by a significant amount, since every time a new rustc version releases, it would create its own set of caches and leave the old set of caches there

@jedel1043 jedel1043 closed this Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Meta Issues and PRs related to the repository itself C-Actions Pull requests that update Github Actions code C-Builtins PRs and Issues related to builtins/intrinsics C-Tests Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: Include Rust toolchain version in GitHub Actions cache keys

2 participants