Conversation
- Add scripts/prune_actions_caches.py: keeps newest entry per (ref, normalized-key) group, evicts entries unused for 7 days. - Add .github/workflows/cache-prune.yml: daily scheduled prune (actions:write, dry-run dispatch input). - _ci-clients.yml: hermit/pub cache saves no longer run on pull_request events (restore stays unconditional). One-time prune already executed on this repo: 161 entries / 4.13 GB freed (1417 -> 1256 entries).
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
🧪 Jev PR-Triage PilotPR #65: ci: prune actions cache bloat and guard PR cache writes — verdict: REVIEW
Block reason (if any): |
🧪 Jev PR-Triage (v3)PR #65: ci: prune actions cache bloat and guard PR cache writes — verdict: REVIEW
🔍 Reviewer focus
Block reason (if any): |
🧪 Jev PR-Triage (v3) — ADVISORY, NON-GATINGPR #65: ci: prune actions cache bloat and guard PR cache writes — verdict: REVIEW
🔍 Reviewer focus
Block reason (if any): |
Summary
Actions cache storage had grown to 1,417 entries / 13.28 GB (13.16 GB of it scoped to
product/main), risking GitHub's ~10 GB per-repo cache quota forcing blind eviction. Root causes: per-push exact-key saves (rust caches, sccache shards, relay artifacts) accumulate superseded versions that are never deleted, and two cache saves ran on PR events too.Changes
scripts/prune_actions_caches.py(new): groups entries by(ref, normalized-key)— hashes/date suffixes stripped — keeps the most recently accessed entry per group, deletes duplicates and anything unused for 7 days.--dry-runmode, exit 1 on delete failures..github/workflows/cache-prune.yml(new): runs the prune daily (cron 23 4 * * *) plus manual dispatch with adry_runinput;actions: writeonly, no checkout credentials persisted; reports remaining entry count afterwards..github/workflows/_ci-clients.yml: hermit + pub cachesavesteps now also requiregithub.event_name != 'pull_request'(restore unaffected). These were the last two unguarded saves; every other save path was already push-gated or cache-hit-gated.Evidence
would delete 161 entries freeing 4.13 GB, 0 failures.GET /actions/cachestotal_count).Notes
product/main; this PR adds the missing eviction policy and the last PR guards.save-iftorelease.yml's rust-cache (tag-triggered, never a PR — no-op at best, harmful churn if triggered otherwise).