This is an automated email from the ASF dual-hosted git repository.

uros-b pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new f8047d8b6103 [SPARK-58459][INFRA] Manage build_main.yml per-branch 
instead of gating on github.ref
f8047d8b6103 is described below

commit f8047d8b61032373538027ef494920d7352996f3
Author: Tian Gao <[email protected]>
AuthorDate: Sun Aug 2 17:23:12 2026 +0000

    [SPARK-58459][INFRA] Manage build_main.yml per-branch instead of gating 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`. For a 
`push` event, GitHub Actions always evaluates the workflow file from the ref 
being pushed, so `master`'s copy of this file is only ever evaluated for pushes 
to `master` -- meaning that comparison can never be false and is dead. 
Disabling post-merge CI on `branch-4.x` is instead handled in that branch's own 
copy of the workflow (separate PR again [...]
    
    The fork sync-`master` skip is retained:
    
    ```yaml
    if: >-
      github.repository == 'apache/spark'
      || github.ref != 'refs/heads/master'
    ```
    
    ### 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.
    
    ### 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.
    
    Closes #57660 from gaogaotiantian/SPARK-58459-master.
    
    Authored-by: Tian Gao <[email protected]>
    Signed-off-by: Uros Bojanic <[email protected]>
---
 .github/workflows/build_main.yml | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/build_main.yml b/.github/workflows/build_main.yml
index e8f7054b2c32..bdc7c21173bb 100644
--- a/.github/workflows/build_main.yml
+++ b/.github/workflows/build_main.yml
@@ -29,12 +29,9 @@ jobs:
     permissions:
       packages: write
     name: Run
-    # Skip:
-    #   - pushes to `branch-4.x` on apache/spark: post-merge CI on this
-    #     integration/staging branch is disabled to save resources.
-    #   - pushes to `master` on forks: the "Sync fork" button mirrors
-    #     apache/spark and would otherwise re-run the full build on every sync.
+    # Skip pushes to `master` on forks: the "Sync fork" button mirrors
+    # apache/spark and would otherwise re-run the full build on every sync.
     if: >-
-      (github.repository == 'apache/spark' && github.ref != 
'refs/heads/branch-4.x')
-      || (github.repository != 'apache/spark' && github.ref != 
'refs/heads/master')
+      github.repository == 'apache/spark'
+      || github.ref != 'refs/heads/master'
     uses: ./.github/workflows/build_and_test.yml


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to