Skip to content

Only save cache if running on main#7460

Merged
youknowone merged 1 commit intoRustPython:mainfrom
ShaharNaveh:save-cache-if-main
Mar 18, 2026
Merged

Only save cache if running on main#7460
youknowone merged 1 commit intoRustPython:mainfrom
ShaharNaveh:save-cache-if-main

Conversation

@ShaharNaveh
Copy link
Contributor

@ShaharNaveh ShaharNaveh commented Mar 17, 2026

Summary by CodeRabbit

  • Chores
    • Pinned Rust cache action to a specific version for improved consistency
    • Optimized build caching to save only on the main branch, reducing unnecessary cache artifacts

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: d68ac8b9-a9ad-4890-a611-001790307cb5

📥 Commits

Reviewing files that changed from the base of the PR and between 0768cf8 and 6423036.

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

📝 Walkthrough

Walkthrough

The CI workflow file is updated to pin the Rust cache action to a specific commit hash (v2.9.1) and adds a conditional restriction so that cache saving only occurs on the main branch, while other branches use the cache without saving.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/ci.yaml
Pins Rust cache action to commit hash c19371144df3bb44fab255c43d04cbc2ab54d1c4 (v2.9.1) and adds save-if condition limiting cache writes to main branch only.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A cache now pinned with careful aim,
Main branch reigns supreme in fame,
Locked to commit, so crisp and clean,
The swiftest workflows ever seen!
Stability hops through all our tests. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Only save cache if running on main' directly and accurately describes the main change: adding a condition to save the cache only when running on the main branch.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

@youknowone youknowone merged commit 3148024 into RustPython:main Mar 18, 2026
27 of 28 checks passed
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.

2 participants