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

vlsi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/main by this push:
     new 20baf40333 [CALCITE-7884] CI should not run twice for a pull request 
from a branch in apache/calcite
20baf40333 is described below

commit 20baf40333f95ae587baec07cfebe7f0e40c0b5f
Author: Vladimir Sitnikov <[email protected]>
AuthorDate: Fri Oct 23 11:27:51 2026 +0300

    [CALCITE-7884] CI should not run twice for a pull request from a branch in 
apache/calcite
    
    The push trigger of the CI workflow fired for every branch whose name
    has no slash. When a pull request comes from such a branch in
    apache/calcite itself, each commit was tested twice: once for the push
    event and once for the pull_request event. For PR #5350, commit bd7b500
    took 32 jobs and about 455 runner-minutes instead of 16 jobs and about
    229, while the ASF shared runners were already congested.
    
    Limit the push trigger to the main branch and the branch-* release
    branches in main.yml and in gradle-wrapper-validation.yml. Pull requests
    keep their CI through the pull_request event, which is unchanged.
    
    User-visible:
    A push to a branch other than main or a branch-* release branch, in
    apache/calcite or in a fork, runs no CI until a pull request is opened for
    it.
    
    Close apache/calcite#5352
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Co-Authored-By: Claude Haiku 5.5 <[email protected]>
---
 .github/workflows/gradle-wrapper-validation.yml | 7 ++++++-
 .github/workflows/main.yml                      | 5 ++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/gradle-wrapper-validation.yml 
b/.github/workflows/gradle-wrapper-validation.yml
index 698ed1f5b8..ea0d37eddd 100644
--- a/.github/workflows/gradle-wrapper-validation.yml
+++ b/.github/workflows/gradle-wrapper-validation.yml
@@ -13,7 +13,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 name: "Validate Gradle Wrapper"
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - main
+      - 'branch-*'
+  pull_request:
 
 jobs:
   validation:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index bb3d609db5..10581a9eb7 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -25,8 +25,11 @@ on:
   push:
     paths-ignore:
       - 'site/**'
+    # Pull requests get CI from the pull_request event. Without this filter,
+    # a pull request from a branch in this repository runs CI twice per commit.
     branches:
-      - '*'
+      - main
+      - 'branch-*'
   pull_request:
     types: [opened, synchronize, reopened]
     paths-ignore:

Reply via email to