Skip to content

Commit b492a62

Browse files
authored
ci: enable GitHub merge queue (#5036)
### 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 `main` after other PRs land. Configuration changes: - Add the required `meta.environment: github_rulesets` section for ASF-managed GitHub rulesets. - Replace the previous `protected_branches.main` configuration with a default-branch ruleset. - Keep the existing review gate: 1 approval, resolved review conversations, no code-owner requirement, and no last-push approval requirement. - Keep the existing required checks: `Required Checks`, `Check License Headers`, and `Validate PR title`. - Preserve GitHub auto-merge support. - Disable the old strict branch-up-to-date policy so merge queue validates the final merge result instead of requiring every PR branch to be updated manually. - Set the merge queue check timeout to 30 minutes because required checks are expected to finish in under 20 minutes, leaving buffer for runner startup or occasional slow runs. Workflow changes: - Add the `merge_group` event to required workflows so required checks run on merge queue refs. - Keep PR title validation on `pull_request_target`; make the `merge_group` path a no-op because the PR title is validated before a PR enters the queue. Expected behavior: - Merge queue creates a temporary ref for `main + queued PR(s)` and runs required checks there. - CI may run once before a PR enters the queue and once after it enters the queue. - The second run protects `main` from integration failures in the queued merge result. - If a merge-group run fails or times out, GitHub does not merge that group and the affected PR needs to be fixed/requeued. Temporary auto-queue removal: - Remove `.github/workflows/auto-queue.yml` because GitHub native merge queue replaces that scripted auto-queue behavior. - Do not add any `emergency` label 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 ### How was this PR tested? Ran local configuration checks: ```bash ruby -e 'require "yaml"; [".asf.yaml", ".github/workflows/required-checks.yml", ".github/workflows/check-header.yml", ".github/workflows/lint-pr.yml"].each { |f| YAML.load_file(f); puts "ok #{f}" }' ruby -e 'require "yaml"; cfg=YAML.load_file(".asf.yaml"); abort "missing meta" unless cfg["meta"] && cfg["meta"]["environment"] == "github_rulesets"; mq=cfg["github"]["rulesets"].find { |r| r["name"] == "Merge Queue" }; abort "missing merge queue" unless mq; abort "main branch protection still present" if cfg.dig("github", "protected_branches", "main"); checks=mq["rules"].find { |r| r["type"] == "required_status_checks" }["parameters"]["required_status_checks"].map { |c| c["context"] }; abort checks.inspect unless checks == ["Required Checks", "Check License Headers", "Validate PR title"]; puts "asf ruleset sanity ok"' git diff --check ``` 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)
1 parent 078ab64 commit b492a62

5 files changed

Lines changed: 57 additions & 352 deletions

File tree

.asf.yaml

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
# https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features
1919

20+
meta:
21+
environment: github_rulesets
22+
2023
github:
2124
description: "Human-AI Collaborative Data Science Using Visual Workflows"
2225
homepage: https://texera.apache.org/
@@ -61,23 +64,53 @@ github:
6164
squash_commit_message: PR_TITLE_AND_DESC
6265
merge: false
6366
rebase: false
64-
65-
protected_branches:
66-
main:
67-
required_status_checks:
68-
# strict means "Require branches to be up to date before merging".
69-
strict: true
70-
# contexts are the names of checks that must pass
71-
contexts:
72-
- Required Checks
73-
- Check License Headers
74-
- Validate PR title
75-
required_pull_request_reviews:
76-
dismiss_stale_reviews: false
77-
require_code_owner_reviews: false
78-
required_approving_review_count: 1
79-
required_linear_history: true
80-
required_conversation_resolution: true
67+
68+
rulesets:
69+
- name: Merge Queue
70+
target: branch
71+
source_type: Repository
72+
source:
73+
enforcement: active
74+
conditions:
75+
ref_name:
76+
exclude: []
77+
include:
78+
- "~DEFAULT_BRANCH"
79+
rules:
80+
- type: deletion
81+
- type: non_fast_forward
82+
- type: merge_queue
83+
parameters:
84+
merge_method: SQUASH
85+
max_entries_to_build: 5
86+
min_entries_to_merge: 1
87+
max_entries_to_merge: 5
88+
min_entries_to_merge_wait_minutes: 5
89+
grouping_strategy: ALLGREEN
90+
check_response_timeout_minutes: 30
91+
- type: pull_request
92+
parameters:
93+
dismiss_stale_reviews_on_push: false
94+
require_code_owner_review: false
95+
require_last_push_approval: false
96+
required_approving_review_count: 1
97+
required_review_thread_resolution: true
98+
- type: required_linear_history
99+
- type: required_status_checks
100+
parameters:
101+
strict_required_status_checks_policy: false
102+
do_not_enforce_on_create: false
103+
required_status_checks:
104+
- context: Required Checks
105+
integration_id: -1
106+
- context: Check License Headers
107+
integration_id: -1
108+
- context: Validate PR title
109+
integration_id: -1
110+
bypass_actors:
111+
- actor_id: 4
112+
actor_type: RepositoryRole
113+
bypass_mode: always
81114

82115
notifications:
83116
commits: commits@texera.apache.org

0 commit comments

Comments
 (0)