nzw921rx opened a new pull request, #11963:
URL: https://github.com/apache/seatunnel/pull/11963

   ### Purpose of this pull request
   
   #### Background
   
   Two recent fixes exposed deterministic compilation failures only after 
related changes had reached `dev`:
   
   * [#11954](https://github.com/apache/seatunnel/pull/11954) fixed a remaining 
test reference after a constant had been removed. The stale reference prevented 
the `seatunnel-engine-server` test sources from compiling.
   * [#10998](https://github.com/apache/seatunnel/pull/10998) updated a missed 
`JdbcHiveIT` call site after a method signature gained a parameter.
   
   These were not flaky tests. A pull request can pass CI against the baseline 
available at that time and still become incompatible with `dev` or with another 
pull request merged immediately before it.
   
   This PR introduces a [GitHub Merge 
Queue](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue)
 gate for `dev`. GitHub validates a temporary `merge_group` containing the 
latest `dev`, the current pull request, and any pull requests ahead of it 
before updating `dev`.
   
   #### Implementation
   
   1. Add a dedicated merge-group build.
   
      `.github/workflows/merge_queue.yml` listens to 
`merge_group.checks_requested` and runs:
   
      ```shell
      ./mvnw -B -T 1C clean install -DskipTests
      ```
   
      `-DskipTests` skips test execution but still compiles main and test 
sources, so missing symbols and incompatible method signatures are detected. 
The job uses Temurin JDK 8, the Maven cache, read-only repository permissions, 
and a 30-minute job timeout. Based on comparable full-install jobs, the 
expected healthy runtime on a four-core runner is approximately 10–20 minutes.
   
      The Maven step is retried up to three times within the job timeout to 
tolerate transient repository failures such as HTTP 403 responses or connection 
resets. Each attempt is limited to 28 minutes, with a 10-second delay before 
another attempt.
   
      The job is named `Build` intentionally. `dev` already requires the GitHub 
Actions `Build` context. Pull-request and merge-group required checks are 
coupled, so reusing this context lets normal pull requests keep the existing 
Build validation while the merge group reports the final full-compilation gate.
   
   2. Manage the queue through `.asf.yaml`.
   
      The ASF-supported raw repository ruleset activates Merge Queue for the 
exact `refs/heads/dev` ref with these settings:
   
      | Setting | Value | Reason |
      | --- | --- | --- |
      | Bypass actors | None | Phase one does not allow direct-merge bypasses, 
including an administrator bypass list. |
      | Build concurrency | 5 | Dispatch at most five merge-group validations 
concurrently. Additional entries wait in FIFO order. |
      | Required-check strategy | `ALLGREEN` | Every queue entry must pass the 
required check. |
      | Minimum merge group size | 1 | A single queued PR can proceed 
immediately. |
      | Maximum merge group size | 1 | Merge PRs into `dev` individually during 
phase one. |
      | Wait for minimum group | 0 minutes | Do not delay an available PR to 
form a batch. |
      | Merge method | `SQUASH` | Match the repository's enabled merge method. |
      | Required-check response timeout | 45 minutes | Allow runner scheduling 
and status-reporting time around the 30-minute Actions job. |
   
      Classic `protected_branches.dev` settings remain in place, so the 
existing approval requirement and required `Build` check continue to apply 
alongside the Merge Queue ruleset.
   
   3. Avoid duplicate Backend runs for queue branches.
   
      GitHub owns the `gh-readonly-queue/**` temporary branch namespace. 
`build_main.yml` now ignores pushes to that namespace so a merge group runs 
only the dedicated compilation gate instead of also starting the complete 
existing Backend matrix. Ordinary branch pushes and the final push to `dev` 
continue to run the existing Build workflow.
   
   #### Queue and failure behavior
   
   * When capacity is available, GitHub dispatches the merge-group build 
immediately; there is no minimum build concurrency or idle delay.
   * A failing or timed-out merge group does not update `dev`. GitHub removes 
the affected PR from the queue and leaves it open with the failure details.
   * After the PR is fixed or rebased, a writer must select `Merge when ready` 
again.
   * If an earlier queued PR fails, GitHub rebuilds later temporary groups 
without that PR.
   * GitHub does not publish a total queue-length limit. Entries beyond the 
build concurrency remain queued in FIFO order.
   * This PR itself must merge through the existing process. Once it reaches 
`dev`, ASF applies the active ruleset automatically; no separate manual Merge 
Queue configuration is required under normal operation.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No SeaTunnel runtime, connector, configuration, or public API behavior 
changes. This changes the maintainer workflow for merging pull requests into 
`dev`.
   
   ### How was this patch tested?
   
   The following checks passed locally:
   
   ```shell
   ./mvnw spotless:apply
   
   git diff --check
   git diff --cached --check
   
   ruby -e 'require "yaml"; [".asf.yaml", ".github/workflows/build_main.yml", 
".github/workflows/merge_queue.yml"].each { |f| YAML.load_file(f); puts "#{f}: 
valid YAML" }'
   
   actionlint .github/workflows/build_main.yml .github/workflows/merge_queue.yml
   
   asfyaml-validate --repo "$PWD"
   ```
   
   Validation details:
   
   * `actionlint` version: 1.7.12
   * ASF validator source: `apache/infrastructure-asfyaml` at 
`32076d4b739c35460b6f67091df5e82553e251e5`
   * ASF validator result: `.asf.yaml is a valid .asf.yaml file.`
   
   `./mvnw verify` and test suites were not run. This PR changes only GitHub 
Actions and ASF repository-policy YAML; the Merge Queue workflow is the 
full-compilation integration gate introduced by this change.
   
   ### Check list
   
   * [x] No new Jar or binary package is added.
   * [x] No connector documentation or incompatible-change documentation is 
required.
   * [x] No connector registration, distribution, or E2E fixture changes are 
required.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to