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

voonhous pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 10658fb268a8 chore(ci): enable the merge queue on master (#20474)
10658fb268a8 is described below

commit 10658fb268a89441a4b5b07f6581e5ebe7ce7b13
Author: voonhous <[email protected]>
AuthorDate: Thu Nov 5 15:20:42 2026 +0800

    chore(ci): enable the merge queue on master (#20474)
    
    * chore(ci): enable the merge queue on master
    
    Turns on GitHub's merge queue for master through an .asf.yaml ruleset
    (#20471, #19612) and requires the Required Checks aggregate from
    ci.yml next to validate-pr-and-source. Each PR is then tested against
    the latest master plus the PRs queued ahead of it before it lands,
    which catches combinations that break master even though each PR
    passed on its own.
    
    The ruleset payload is the one apache/arrow-rs runs (squash, two
    groups building at a time, apache/root as bypass actor). Lands only
    after ci.yml reports Required Checks on PRs.
    
    * chore(ci): require the per-workflow Java CI aggregate checks
    
    Java CI stays two workflows (bot.yml and java_ci_engines.yml) instead
    of one ci.yml run, which would exceed the ASF Actions policy limit of
    20 jobs running at once per workflow (#20473 review). Each workflow
    ends with its own aggregate job, so the merge queue requires
    "Java CI result" and "Java CI Engines result" in place of
    "Required Checks".
    
    * chore(ci): let Hudi committers bypass the merge queue by PR
    
    Review on #20474: master's first Java CI attempt fails on about one
    run in ten, some of them flakes, and only apache/root could merge
    around the queue. apache/hudi-committers gets bypass_mode
    pull_request, as Iceberg and SeaTunnel give their committers: a PR can
    be merged without the queue, but nobody can push to master directly.
    Re-queueing stays the normal answer to a failed entry.
---
 .asf.yaml | 57 ++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 48 insertions(+), 9 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index 9edd88151b05..39795fe30946 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -45,18 +45,57 @@ github:
       required_pull_request_reviews:
         required_approving_review_count: 1
       required_status_checks:
+        # The merge queue tests each PR against the latest master, so PRs need 
not be up to date.
         strict: false
         contexts:
-          # The per-job test contexts are no longer required individually. 
Listing them here
-          # is what made every change to the CI matrix in 
.github/workflows/bot.yml a
-          # two-sided edit, and a context left without a job to report it 
blocks merges
-          # indefinitely. Reviewers gate on the checks the PR shows.
-          # Only contexts from always-on workflows may be listed. bot.yml and
-          # java_ci_engines.yml are path-filtered: on a PR the filter skips, 
GitHub never
-          # instantiates them, so any context of theirs would stay pending 
forever
-          # (#18598 hit exactly this and worked around it with a gating job).
-          # validate-pr-and-source runs the PR metadata and source release 
checks in one job
+          # Only contexts that report on every PR and every merge-queue group 
may be listed: a
+          # context left without a run to report it blocks merges indefinitely 
(#18598).
+          # The per-job test contexts are not listed. Each Java CI workflow 
ends with one aggregate
+          # job over all of its jobs, so resharding a workflow never touches 
this file. There is
+          # one aggregate per workflow, not one for both, because the ASF 
Actions policy caps the
+          # jobs running at once per workflow at 20 (15 recommended).
+          # validate-pr-and-source runs the PR metadata and source release 
checks in one job.
           - validate-pr-and-source
+          - Java CI result
+          - Java CI Engines result
+  # Raw GitHub Rulesets API payload, as in apache/arrow-rs and 
apache/datafusion-comet.
+  # Rulesets and classic branch protection apply together.
+  rulesets:
+    - name: Merge Queue
+      target: branch
+      enforcement: active
+      bypass_actors:
+        # apache/root (ASF Infra) can recover a blocked queue.
+        - actor_id: 118420
+          actor_type: Team
+          bypass_mode: always
+        # apache/hudi-committers can merge a PR without the queue, through the 
PR only (no direct
+        # pushes). A failed entry leaves the queue and is re-queued with 
"Merge when ready"; the
+        # bypass is for a known flake that keeps failing, a stalled queue, or 
an urgent fix.
+        - actor_id: 3084687
+          actor_type: Team
+          bypass_mode: pull_request
+      conditions:
+        ref_name:
+          include:
+            - "~DEFAULT_BRANCH"
+          exclude: []
+      rules:
+        - type: merge_queue
+          parameters:
+            merge_method: SQUASH
+            grouping_strategy: ALLGREEN
+            # Two groups build at a time. A group invalidated mid-run still 
runs to the end,
+            # because workflows cannot react to the merge_group destroyed 
event, so this caps
+            # the waste per failed entry at one full Java CI run.
+            max_entries_to_build: 2
+            # Merges up to five already-green entries together; each PR keeps 
its own squash
+            # commit, and CI builds are not batched.
+            min_entries_to_merge: 1
+            max_entries_to_merge: 5
+            min_entries_to_merge_wait_minutes: 0
+            # A full Java CI run plus ASF runner queueing.
+            check_response_timeout_minutes: 300
   collaborators:
     - ad1happy2go
     - rangareddy

Reply via email to