Skip to content

Cache cargo-codspeed installation metadata - #8620

Merged
youknowone merged 1 commit into
RustPython:mainfrom
moreal:fix/codspeed-cargo-install-cache
Aug 30, 2026
Merged

youknowone merged 1 commit into
RustPython:mainfrom
moreal:fix/codspeed-cargo-install-cache

Conversation

@moreal

@moreal moreal commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

One of checkbox below must be checked.

  • I did not use AI to write the code of this patch.
  • This PR follows our AI policy

Summary

The CodSpeed workflow caches the cargo-codspeed executable under ~/.cargo/bin but omits ~/.cargo/.crates.toml and ~/.cargo/.crates2.json, which record the packages installed by Cargo. After the main-branch workflow saves that incomplete cache, subsequent jobs restore the executable without its installation records. Cargo then treats the executable as an untracked destination conflict, causing cargo install cargo-codspeed to fail with exit code 101 instead of recognizing the existing installation.

This change adds both Cargo installation metadata files to the cached paths and links the relevant Cargo documentation next to the entries. It also changes the cache namespace from codspeed- to codspeed-v2- because GitHub Actions caches are immutable; without a new namespace, jobs would continue restoring the already-saved incomplete cache.

Summary by CodeRabbit

  • Chores
    • Improved benchmark workflow caching for faster, more consistent performance testing.
    • Updated the benchmark cache version to ensure refreshed cache data is used.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1bbdafb8-ab3d-4aca-a100-59304781f69c

📥 Commits

Reviewing files that changed from the base of the PR and between fc0069f and 9099644.

📒 Files selected for processing (1)
  • .github/workflows/codspeed.yaml

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The CodSpeed workflow now caches two additional Cargo metadata files and uses the codspeed-v2- prefix for cache restoration and saving.

Changes

CodSpeed cache workflow

Layer / File(s) Summary
Update Cargo cache paths and keys
.github/workflows/codspeed.yaml
The workflow adds .crates2.json and .crates.toml to CACHE_PATHS. Restore and save steps use the codspeed-v2- cache prefix.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 90996

The workflow now caches Cargo installation metadata alongside the executable and uses a new cache namespace, preventing stale incomplete caches from being reused. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: caching cargo-codspeed installation metadata in the CodSpeed workflow.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the z-ca-2026 Tag to track Contribution Academy 2026 label Aug 30, 2026
@moreal moreal changed the title Fix CodSpeed cargo install cache Cache cargo-codspeed installation metadata Aug 30, 2026
@moreal moreal added the skip:ci Skip running the ci label Aug 30, 2026
Assisted-by: Codex:gpt-5.6-sol
@moreal
moreal force-pushed the fix/codspeed-cargo-install-cache branch from 5679dc1 to 9099644 Compare August 30, 2026 08:03
@moreal
moreal marked this pull request as ready for review August 30, 2026 08:05
@moreal
moreal requested a review from youknowone August 30, 2026 08:08
@youknowone
youknowone enabled auto-merge (squash) August 30, 2026 08:27
@youknowone
youknowone disabled auto-merge August 30, 2026 12:31
@youknowone
youknowone merged commit b566b16 into RustPython:main Aug 30, 2026
14 checks passed
youknowone pushed a commit that referenced this pull request Sep 16, 2026
Assisted-by: Codex:gpt-5.6-sol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip:ci Skip running the ci z-ca-2026 Tag to track Contribution Academy 2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants