ci: enable GitHub merge queue#5036
Merged
Merged
Conversation
# Conflicts: # .asf.yaml # .github/workflows/github-action-build.yml # .github/workflows/lint-pr.yml
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5036 +/- ##
=========================================
Coverage 42.77% 42.78%
+ Complexity 2195 2194 -1
=========================================
Files 1045 1045
Lines 39985 39985
Branches 4217 4217
=========================================
+ Hits 17105 17107 +2
+ Misses 21820 21819 -1
+ Partials 1060 1059 -1
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
aglinxinyuan
approved these changes
May 12, 2026
Yicong-Huang
pushed a commit
that referenced
this pull request
May 13, 2026
### What changes were proposed in this PR? Remove the `bypass_actors:` block from the `Merge Queue` ruleset added in #5036. ASF Infra flagged that block specifically with `Invalid property /bypass_actors/0/actor_id: "4" is not of type integer`, and removing it is the minimal change that addresses that error. ### Background Since #5036 merged, every push to `main` triggers this email from ASF Infra: ``` Validation failed while creating ruleset 'Merge Queue': Invalid request. Invalid property /bypass_actors/0/actor_id: `"4"` is not of type `integer`. Invalid property /rules/2: data matches no possible input. Invalid property /rules/3: data matches no possible input. Invalid property /rules/5: data matches no possible input. ``` This PR addresses the first line (`bypass_actors/0/actor_id`). ASF Infra's follow-up reply did not include a `bypass_actors` block in the recommended example, so removing it aligns with their suggestion. ### How was this PR tested? Verified `.asf.yaml` still parses through `strictyaml` and that the only change is the four removed `bypass_actors` lines: ```bash git diff -- .asf.yaml ruby -e 'require "yaml"; YAML.load_file(".asf.yaml"); puts "ok"' ``` No automated runtime tests added — this PR only changes repository configuration. ### Any related issues, documentation, discussions? Follow-up to #5036. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7)
aglinxinyuan
pushed a commit
that referenced
this pull request
May 13, 2026
### What changes were proposed in this PR? This PR is a follow-up to #5036 to keep enabling GitHub merge queue while making the ruleset payload accepted by the GitHub repository rulesets API after ASF Infra reported validation errors for the rules array. Merge queue support: - Keep the `merge_queue` rule in `.asf.yaml`; this PR does not remove or disable merge queue. - Keep the ruleset display/reconciliation name as `Merge Queue`. - Keep the same merge queue behavior: squash merge, up to 5 entries, `ALLGREEN`, and a 30-minute check response timeout. Payload compatibility changes: - Remove `source_type` and `source` from the raw ruleset payload because they are response fields and are not needed in the create request body. - Add `allowed_merge_methods: [squash]` to the `pull_request` rule so the pull request rule explicitly matches the repository merge policy. - Remove `do_not_enforce_on_create` from the `required_status_checks` rule to keep the payload aligned with the asfyaml raw ruleset example. - Remove `integration_id: -1` from required status checks because direct GitHub API validation rejected `-1` as an invalid integration id, while omitting the field is accepted. Validation notes: - Direct API validation on a personal fork rejected `merge_queue`, which appears to be because merge queue is only available for organization-owned repositories. - Retested on the organization-owned public repository `Texera/Udon` using the `Yicong-Huang` admin account. - A minimal disabled `merge_queue` ruleset was created successfully on `Texera/Udon` and deleted immediately afterward. - The full #5050 payload, including the ruleset name `Merge Queue`, was also created successfully as a disabled ruleset on `Texera/Udon` and deleted immediately afterward. - This confirms the updated payload shape supports `merge_queue` in an org-owned repository context. ### Any related issues, documentation, discussions? Related to #4553 and follow-up to #5036. ### How was this PR tested? Ran local configuration checks: ```bash ruby -e 'require "yaml"; cfg=YAML.load_file(".asf.yaml"); rs=cfg.dig("github", "rulesets").find { |r| r["name"] == "Merge Queue" }; abort "missing ruleset" unless rs; abort "unexpected source fields" if rs.key?("source_type") || rs.key?("source"); pr=rs["rules"].find { |r| r["type"] == "pull_request" }; abort "missing allowed_merge_methods" unless pr.dig("parameters", "allowed_merge_methods") == ["squash"]; status=rs["rules"].find { |r| r["type"] == "required_status_checks" }; abort "unexpected do_not_enforce_on_create" if status["parameters"].key?("do_not_enforce_on_create"); abort "unexpected integration_id" if status["parameters"]["required_status_checks"].any? { |c| c.key?("integration_id") }; puts "ruleset sanity ok"' git diff --check ``` Also validated against the GitHub repository rulesets API on `Texera/Udon`: - Created and deleted a temporary disabled minimal `merge_queue` ruleset. - Created and deleted a temporary disabled ruleset using the full #5050 payload with the name `Merge Queue`. No automated runtime tests were added because this PR only changes repository configuration. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: OpenAI Codex (GPT-5) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
This PR enables GitHub merge queue for the default branch so ready PRs no longer need to repeatedly update against
mainafter other PRs land.Configuration changes:
meta.environment: github_rulesetssection for ASF-managed GitHub rulesets.protected_branches.mainconfiguration with a default-branch ruleset.Required Checks,Check License Headers, andValidate PR title.Workflow changes:
merge_groupevent to required workflows so required checks run on merge queue refs.pull_request_target; make themerge_grouppath a no-op because the PR title is validated before a PR enters the queue.Expected behavior:
main + queued PR(s)and runs required checks there.mainfrom integration failures in the queued merge result.Temporary auto-queue removal:
.github/workflows/auto-queue.ymlbecause GitHub native merge queue replaces that scripted auto-queue behavior.emergencylabel behavior in this PR. Emergency priority should be handled manually through GitHub queue controls or admin bypass if truly necessary.Any related issues, documentation, discussions?
Closes #4553, also discussed in https://issues.apache.org/jira/browse/INFRA-27864
How was this PR tested?
Ran local configuration checks:
No automated runtime tests were added because this PR only changes repository/GitHub Actions configuration.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex (GPT-5)