ci: run on merge_group so a merge queue can gate main - #459
Merged
Conversation
Prerequisite for enabling the merge queue on main. A queued PR is tested on a merge_group ref holding main's tip plus everything ahead of it in the queue — the state the commit actually lands in. A pull_request run cannot see that, which is the gap that let #444 and #445 both merge green and leave main red: each was tested against a main that did not contain the other, 63 seconds apart, and #444 merged on a nine-hour-old check. Without this trigger the required "build" check never reports for a merge group, so enabling the queue first would stall every PR until it timed out of it. This has to land before the queue is turned on. Also add a push trigger for main as a backstop. The queue makes it largely redundant, but main can still move without passing through a queue via a ruleset bypass, and an unnoticed red main is expensive: five later PRs failed on inherited breakage while CI, running only on pull_request, had no run on main to point at. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
PR Summary by QodoCI: trigger on merge_group and main pushes to support merge queue gating
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTo customize comments, go to the Qodo configuration screen, or learn more in the docs. |
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.
This must land before the merge queue is enabled. Turning the queue on first would stall every open PR.
Why
A queued PR is tested on a
merge_groupref containingmain's tip plus everything ahead of it in the queue — the state the commit will actually land in. Apull_requestrun cannot see that.That gap is exactly what broke
mainearlier today. #445 and #444 merged 63 seconds apart, each tested against amainthat did not contain the other — #444 on a nine-hour-old check whose base never included #445. Verified after the fact:da35eff7965b26Neither PR was broken. The combination was. Five later PRs then inherited the breakage and failed for reasons that had nothing to do with their own changes.
The
mainruleset already requires up-to-date branches (strict: true), but thedaqifi-coreteam holdsbypass_mode: always, so it did not apply. A merge queue closes this properly: it re-tests each entry against the real post-merge state instead of trusting a stale green check.What changes
merge_group— required for the queue. Without it the requiredbuildcheck never reports for a merge group, and queued PRs sit until they're timed out of the queue.push: [main]— backstop only. The queue makes it largely redundant, butmaincan still move without passing through a queue (ruleset bypass, admin push), and today showed the cost of an unnoticed redmain: CI running only onpull_requestleft no run onmainto point at.No job or step changes; the required check context stays
build.Queue settings to apply after this merges
Matching the repo's existing config (squash-only,
PR_TITLE/BLANK):🤖 Generated with Claude Code