CI: Select PR matrices incrementally#16566
Conversation
8871ed8 to
0f085f8
Compare
dd3c1c0 to
43ffb7b
Compare
5b1993c to
4682b11
Compare
|
thanks for the PR @ajantha-bhat i've done some work with gradle cache recently (#16356) and made it so that there's only 1 canonical writer. Before this change, I saw that we were constantly getting thrashed by multiple cache writers and cache utilization was really low. Theres also a security component to this, we should only write to cache on push to I'm curious how this change effects when to save to cache and how its reused |
4682b11 to
dc78709
Compare
|
Thanks @kevinjqliu, good catch. I updated the PR to preserve #16356's cache model. The selective PR matrix planner now stands on its own, and this PR no longer adds custom cache artifact merge/store actions or additional Gradle cache writers. Behavior after the update:
So the runner reduction now comes from selective matrices, while the shared Gradle cache writer remains unchanged. |
|
@kevinjqliu, @nastra, @stevenzwu : Can we please review this? |
|
ping (maybe @kevinjqliu) |
|
Thanks for working on this. I agree with the goal of reducing GH Actions usage. My main concern is maintainability. This adds a fairly large hand-maintained CI planner with path regexes, workflow routing, version selection, and CVE artifact mapping all in Bash. As the repo changes, it seems easy to miss updating this and accidentally skip important CI coverage. So +1 on the direction, but I’m not sure this implementation is safe to maintain as-is. I think we should first agree on how we want to keep this selection logic understandable and hard to accidentally under-run. |
dc78709 to
110a61d
Compare
110a61d to
ba49482
Compare
|
Thanks @kevinjqliu , I agree with the maintainability concern. But the win is still worth pursuing given the GH Actions pressure and PR wall-time cost, but only if the planner is conservative and easy to reason about. I revised the PR with that in mind:
The intended invariant is: stale planner logic may run more CI, but should not silently under-run coverage. Open questions:
|
|
To post here as well, I made a smaller PR that simplifies the maintainability and reduce CI jobs #16951 . |
Mailing list discussion: https://lists.apache.org/thread/36vxlql61gojbg639c86mnz78n57kvgm
Summary
full-cilabels, and global build/workflow changes to select PR matricesmain, release branches, tags,full-ci, global build/workflow changes, and unknown changed code pathsjava-ci.ymlbuild-checks (17)writes cache onmain; all other Gradle jobs are read-onlySelective PR behavior
spark/v<known-version>/**selects only that Spark version; unknown Spark version paths force full CIflink/v<known-version>/**selects only that Flink version; unknown Flink version paths force full CICVE behavior
Maintainability guardrails
gradle.properties; versioned paths are parsed generically rather than listed one by one.github/scripts/plan-pr-ci-test.shto validate important routing casesValidation
git diff --check origin/main...HEADbash -n .github/scripts/plan-pr-ci.shbash -n .github/scripts/plan-pr-ci-test.shbash .github/scripts/plan-pr-ci-test.sh./gradlew -DallModules build -x test -x javadoc -x integrationTestRebased on latest
origin/mainand pushed as single commitba49482fac.