Merged
Conversation
v2 is a composite action whose post-save and delete-old-caches steps don't run reliably, letting per-run julia caches (~250 MB each) accumulate on refs/heads/main until the repository hits its 10 GB cache cap. v3 is a JavaScript rewrite with a proper post hook. It also uses Node.js 24 directly, dropping the latent Node 20 exposure from v2's transitive actions/cache dependency.
pull_request events from forks ship a read-only GITHUB_TOKEN regardless of the permissions: block, so gh cache delete fails with HTTP 403 and the fork PR's ~1-2 GB of caches leak into the repo's 10 GB cache budget. Observed on PR #14374 (8/8 deletes returned 403, run succeeded because set +e swallowed the failures). pull_request_target runs in the base-branch context with full write permissions. Safe for this workflow: no PR code is checked out, the steps only call gh cache list/delete.
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.
The repository hit its 10 GB GH Actions cache cap (9.81 GB actual), with 9.42 GB dominated by
julia-actions/cacheentries. 37 julia caches onrefs/heads/mainalone accounted for 7.78 GB, evicting useful caches for other CI workflows (Rrenv,deno_std).Root cause: per-run accumulation on main
julia-actions/cache@v2is a composite action whose post-save anddelete-old-cachessteps do not run reliably. Each cache key containsrun_idandrun_attempt, so every CI run creates a new ~250 MB entry and older entries are never deleted. 37 entries were observed onmainacross only 4 days.v3is a JavaScript rewrite with a proper post hook. Combined with theactions: writepermission already granted intest-smokes.yml, the action now keeps only the newest entry per(workflow, os)tuple.v3also uses Node.js 24 directly, dropping the transitive Node 20 dependency fromv2's bundledactions/cache— partially reduces the remaining scope in #14201 but does not close it.Root cause: fork PR cleanup silently failed
cleanup-caches.ymltriggered onpull_request: closed, butpull_requestevents from forks ship a read-onlyGITHUB_TOKENregardless of thepermissions:block. Verified on merged PR #14374: all 8gh cache deletecalls returnedHTTP 403: Resource not accessible by integration, leaving 1.98 GB orphaned.set +eswallowed the failures so the run reported success.pull_request_targetruns in the base-branch context with full write permissions. Safe here: the workflow does not check out PR code — it only callsgh cache list/deleteusing the PR number from the event payload. The fix only applies to PR closes after this merges, sincepull_request_targetreads its workflow from the base branch.A one-off manual cleanup of pre-existing stale caches (32 entries, ~7.7 GB) has already been run; this PR prevents recurrence.
Refs #14201