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

dongjoon-hyun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 9ef651f  [SPARK-57788] Prevent Build CI cancellation between different 
commits in `main` branch
9ef651f is described below

commit 9ef651f2fc136b4ae597ccd894d3f90152e78add
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Tue Jun 30 15:39:58 2026 -0700

    [SPARK-57788] Prevent Build CI cancellation between different commits in 
`main` branch
    
    ### What changes were proposed in this pull request?
    
    This PR scopes the `Build` workflow `concurrency.group` by commit SHA on 
`main`, while keeping the existing branch-level grouping for all other branches:
    
    ```yaml
    group: ${{ github.workflow }}-${{ github.ref }}${{ github.ref == 
'refs/heads/main' && format('-{0}', github.sha) || '' }}
    ```
    
    ### Why are the changes needed?
    
    With the branch-only key, all `Build` runs on a branch shared one 
concurrency group, and `cancel-in-progress: true` made unrelated runs cancel 
each other. Re-running an older commit's failed jobs on `main` cancelled the 
newest commit's in-progress CI.
    
    Appending the commit SHA only on `main` ensures different commits no longer 
cancel each other there, while feature/PR branches keep the original behavior 
where a new push cancels the previous in-progress run on the same branch.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Manual review.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Opus 4.8
    
    Closes #720 from dongjoon-hyun/SPARK-57788.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .github/workflows/build_main.yml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build_main.yml b/.github/workflows/build_main.yml
index 1c88907..04a1da7 100644
--- a/.github/workflows/build_main.yml
+++ b/.github/workflows/build_main.yml
@@ -23,9 +23,10 @@ on:
   push:
     branches: [ "**" ]
 
-# Cancel previous build on the same branch
+# Cancel previous build on the same branch, except on `main` where different
+# commits (e.g. a re-run of an older commit) must not cancel each other
 concurrency:
-  group: ${{ github.workflow }}-${{ github.ref }}
+  group: ${{ github.workflow }}-${{ github.ref }}${{ github.ref == 
'refs/heads/main' && format('-{0}', github.sha) || '' }}
   cancel-in-progress: true
 
 jobs:


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

Reply via email to