chore(ci): batch closed-PR cache cleanup into a 6-hourly sweep#8512
Merged
Conversation
The per-closed-PR pull_request_target trigger queued one runner per close — dozens of runs a day at the one-shot gate's volume, competing with real CI for the org's concurrent-runner cap during exactly the bursts when CI is most backed up (observed: 60-run queue saturation). A cache entry lingering a few hours between sweeps costs nothing, so one scheduled sweep (4/day flat, volume-independent) replaces N per-close runs: enumerate PR-scoped cache refs, check each unique PR's real state (never inferred from cache age — an idle-but-open maintainer branch must never lose a restorable cache), delete the closed ones.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8512 +/- ##
===========================================
+ Coverage 63.16% 92.53% +29.36%
===========================================
Files 791 793 +2
Lines 79348 79527 +179
Branches 23970 24029 +59
===========================================
+ Hits 50124 73591 +23467
+ Misses 25514 4799 -20715
+ Partials 3710 1137 -2573
Flags with carried forward coverage won't be shown. Click here to find out more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Queue-pressure follow-up to today's Actions saturation (60 queued runs at peak; CodeQL default-setup already disabled separately). The per-closed-PR
pull_request_target:[closed]trigger queued one runner per close — dozens/day at the one-shot gate's volume, all competing with real CI for the concurrent-runner cap. This converts it to a 6-hourly scheduled sweep (+ manual dispatch):actions: writescope, pluspull-requests: readfor the state checks; single non-cancelling concurrency group.Validation
actionlintclean (shellcheck-clean after converting the sweep loops towhile read). Trigger-and-permissions-only change; no repo code touched.