fix: use rolling cache key for clcache on Windows to get cache hits#1169
fix: use rolling cache key for clcache on Windows to get cache hits#1169
Conversation
The static key caused clcache to restore a stale entry after every MSVC runner update, resulting in 0 hits / 701 misses on every build run. A sha-based key with a prefix restore-keys fallback and save-always mirrors the rolling strategy used by ccache-action on Linux/macOS. https://claude.ai/code/session_01XTvMZtPH8WpuiRBZkqWiHk
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughUpdated the Windows Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 50 minutes and 7 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/build.yml:
- Line 82: Replace the unsupported save-always input on actions/cache@v5 by
splitting restore and save into separate steps: use actions/cache@v5 with the
restore step (actions/cache/restore) before build, then add a distinct cache
save step (actions/cache/save) after build guarded with if: always() so it runs
even on failure; also read and use the cache-hit output (cache-hit) from the
restore step to avoid unnecessary overwrites when implementing the save step.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: beea262a-c35c-4750-90ab-33083730990c
📒 Files selected for processing (1)
.github/workflows/build.yml
actions/cache v5.0.5 marks save-always as deprecated and "not working as intended". Replace the single cache step with a restore step before the build and a save step after, guarded by always() so it runs on build failure too. The save is skipped on an exact cache-hit to avoid redundant uploads. https://claude.ai/code/session_01XTvMZtPH8WpuiRBZkqWiHk
The static key caused clcache to restore a stale entry after every MSVC
runner update, resulting in 0 hits / 701 misses on every build run. A
sha-based key with a prefix restore-keys fallback and save-always mirrors
the rolling strategy used by ccache-action on Linux/macOS.
https://claude.ai/code/session_01XTvMZtPH8WpuiRBZkqWiHk
Summary by CodeRabbit