jdaugherty opened a new pull request, #16646: URL: https://github.com/apache/grails-core/pull/16646
Follow-up to #16645. The core build's flagged matrix entries still wrote the Gradle User Home on every release branch. A run can restore entries only from its own branch and the default branch, so each 7.x branch kept a near-identical copy that no other branch could read. Seven branches with a Linux and a Windows writer each came to about 12.6 GiB, at the roughly 0.9 GiB a writer saves, which is over GitHub's 10 GB limit. ### Changes - A step before the core build's `setup-gradle` decides whether the matrix entry saves. It writes only on a push or dispatch, only on a branch whose major version is at least the default branch's, and, for Windows and macOS, only on that major's first branch (`x.0.x`). Anything unexpected, such as a missing default branch name or a non-numeric branch, leaves the cache read-only. - macOS is now a flagged writer alongside Ubuntu and Windows. - The read-only jobs' comments point at the step instead of describing the old rule. With 8.0.x as the default branch: | Branches | Linux | Windows | macOS | |---|---|---|---| | 7.0.x, 7.1.x, 7.2.x | read-only | read-only | read-only | | 8.0.x, 9.0.x | writes | writes | writes | | 8.1.x, 9.1.x | writes | reads 8.0.x | reads 8.0.x | That is eight writer sets, about 7.2 GiB. The rule is relative to the default branch, so the workflow needs no edit when a new default branch is promoted. Once 9.0.x is the default, the 8.x branches stop writing the same way 7.x does now, and a 10.x line writes as soon as it exists. Because the step reads the default branch at run time, the file is identical on every branch and merge-ups carry it unchanged. ### Verification - The decision script, extracted from the workflow, was run against 19 cases: today's branches on each OS, pull requests, `workflow_dispatch`, a non-writer entry, a missing default branch, a non-release branch, and the future where 9.0.x is the default and 10.0.x exists. All give the expected result. - Every workflow parses as YAML. A parse of all `setup-gradle` steps shows that only the core `build` job can write, from its `ubuntu-latest/17`, `macos-latest/21` and `windows-latest/25` entries; everything else is `cache-read-only: true`. - The write path runs only on pushes after merge; this pull request's runs are read-only. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
