CI: Include Rust toolchain version in cargo cache keys to prevent cache poisoning#5182
CI: Include Rust toolchain version in cargo cache keys to prevent cache poisoning#5182RishavTiwari25 wants to merge 1 commit intoboa-dev:mainfrom
Conversation
Test262 conformance changes
Tested main commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
Deleted this part of the description since there were no updates related to this |
|
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 |
This Pull Request fixes/closes #5181 .
It changes the following:
Get rust_versionstep (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.actions/cachekey 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.