[SPARK-58459][INFRA] Manage build_main.yml per-branch instead of gating on github.ref - #57660
Open
gaogaotiantian wants to merge 1 commit into
Open
[SPARK-58459][INFRA] Manage build_main.yml per-branch instead of gating on github.ref#57660gaogaotiantian wants to merge 1 commit into
gaogaotiantian wants to merge 1 commit into
Conversation
…ng on github.ref ### What changes were proposed in this pull request? Remove the `github.ref != 'refs/heads/branch-4.x'` clause from the `call-build-and-test` job condition in `build_main.yml` on `master`. This clause only had an effect on `branch-4.x`, but for a `push` event GitHub Actions always evaluates the workflow file from the ref being pushed, so this comparison is dead on `master`'s copy of the file. Disabling post-merge CI on `branch-4.x` is instead handled directly in that branch's own copy of the workflow. The fork sync-`master` skip is retained. ### Why are the changes needed? The other build workflows (e.g. `build_java21.yml`, `build_python_3.11.yml`) are already managed per-branch, diverging in name/schedule/`branch:` between `master` and `branch-4.x`. `build_main.yml` was the exception, encoding branch-specific behavior via a runtime `github.ref` check that is inert on `master`. Aligning it with the rest keeps each branch's workflow file self-describing. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? N/A. CI-configuration-only change; behavior on `master` is unchanged. Co-authored-by: Isaac
zhengruifeng
approved these changes
Jul 31, 2026
uros-b
approved these changes
Jul 31, 2026
Member
|
Thank you @gaogaotiantian and @zhengruifeng! |
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.
What changes were proposed in this pull request?
Remove the
github.ref != 'refs/heads/branch-4.x'clause from thecall-build-and-testjob condition inbuild_main.ymlonmaster. For apushevent, GitHub Actions always evaluates the workflow file from the ref being pushed, somaster's copy of this file is only ever evaluated for pushes tomaster-- meaning that comparison can never be false and is dead. Disabling post-merge CI onbranch-4.xis instead handled in that branch's own copy of the workflow (separate PR againstbranch-4.x).The fork sync-
masterskip is retained:Why are the changes needed?
The other build workflows (e.g.
build_java21.yml,build_python_3.11.yml) are already managed per-branch, diverging in name/schedule/branch:betweenmasterandbranch-4.x.build_main.ymlwas the exception, encoding branch-specific behavior via a runtimegithub.refcheck that is inert onmaster. Aligning it with the rest keeps each branch's workflow file self-describing.Does this PR introduce any user-facing change?
No.
How was this patch tested?
N/A. CI-configuration-only change; behavior on
masteris unchanged.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8)
This pull request and its description were written by Isaac.