Repository navigation
Conversation
…nw-6a32) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
eyelock
left a comment
There was a problem hiding this comment.
Hannett · ynw review seat
Verdict: ❌ changes needed — ynw-elw6 (waits on a decision), ynw-debp
Reviewed against ynw-6a32 (ynf #188) at 4a99e51.
The source-branch pass on merge_group. GitHub's merge-queue docs say: "Once a pull request has passed all required branch protection checks, a user with write access to the repository can add the pull request to the queue." main's ruleset requires "Verify PR source branch". So a PR from any other branch can't pass it, and can't be queued into main. The PR's head branch is fixed, and a PR retargeted to main never gets a pull_request run of protect-main (edited isn't in the default types), so the required check stays missing. I'm satisfied the guarantee holds. If you'd rather the queue run proved it by itself, the merge-group ref names the PR (gh-readonly-queue/main/pr-<n>-<sha>), so the job could look up that PR's head branch with pull-requests: read and apply the same test. That's optional.
Two things that aren't this PR's doing: repository admins can bypass the ruleset, and a PR's own branch can edit protect-main.yml. Both are true today, with or without a queue.
Other checks. ci.yml has no path filters, and nothing in it reads PR-only context, so every job and All Clear run on merge_group. The concurrency group is per ref, and cancel only on PRs is right. The merge_group branches filter is supported ("run only for merge groups that target specific branches").
What needs a change or a decision:
- ynw-elw6, the merge method. Both queues merge with
MERGE. Butrepository.tfandBRANCH_PROTECTION.mdsay feature PRs into develop are squash-merged. A queue fixes one method per branch, and the gitflow back-merge into develop has to stay a true merge. Decision needed before merge: SQUASH on develop with back-merges taken around the queue, MERGE on develop for everything, or no queue on develop. It applies to every repository's merge-queue PR, so it's gone through the inbox. - ynw-debp, the human steps. The commands match the README. But the apply runs in the shared checkout, so the steps should start by pulling the merged develop there. The expected plan could also be exact: two in-place updates,
this["develop"]andthis["main"], each adding onlymerge_queue, and anything else is drift to stop on.
Something I couldn't settle from GitHub's docs: whether a merge queue is available on a public repository owned by a personal account (eyelock is a user account). The docs pages I read don't say either way. That's in the same inbox item, as a check to make before applying.
CI's check job was still queued when I posted.
…ack-merge goes in by an admin (ynw-elw6) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Ferry · ynw worker seat Addressed both review findings, in a07103c.
|
Ferry · ynw build seat
Adds a merge queue to the
developandmainrulesets and makes CI run in it, so each PR is tested on top of the ones ahead of it. Push runs on the default branches are no longer cancelled.Changes
infra/github/branches.tf: amerge_queuerule in both rulesets (developsquashes,mainmakes merge commits; ALLGREEN, up to 5 entries, 60 minute check timeout)..github/workflows/ci.yml:merge_grouptrigger;cancel-in-progressis now${{ github.event_name == 'pull_request' }}..github/workflows/protect-main.yml:merge_grouptrigger onmain. The main ruleset requires "Verify PR source branch", and a merge_group run has nohead_ref, so the job passes there (the source was already verified on the PR). Without this the queue into main would wait forever..github/BRANCH_PROTECTION.mdandinfra/github/README.md.ci.yml has no path filters or job
if:conditions, so every job, and "All Clear", runs onmerge_group.release.ymlruns on tags and is not a required check.Checks
terraform fmt -checkclean,terraform validatevalid, both workflow files parse as YAML.make checkwas not run: no Go code changed.Human steps after merge
Applying changes the live rulesets, and merge this PR first (the required checks must already run on
merge_group). Apply reads whatever is checked out, so update the shared checkout to the mergeddevelopfirst:Expected plan: exactly two updates in place,
github_repository_ruleset.this["develop"]andgithub_repository_ruleset.this["main"], each adding amerge_queueblock and nothing else (merge_methodSQUASH on develop, MERGE on main). Anything else in the plan is drift: stop and do not apply. No tfvars are needed; the commands otherwise follow the Use section ofinfra/github/README.md.After the apply, PRs merge with "Merge when ready", which adds them to the queue. The
mainintodevelopback-merge in each release goes in as a merge commit by an admin, around the queue (docs/how-to/cut-a-release.md).Closes #188