Skip to content

ci: build master changes through a merge queue - #1560

Open
joaodinissf wants to merge 1 commit into
masterfrom
ci/merge-queue
Open

joaodinissf wants to merge 1 commit into
masterfrom
ci/merge-queue

Conversation

@joaodinissf

Copy link
Copy Markdown
Collaborator

Why the change

Master should only ever move to a commit that was built exactly as the snapshot build will build it, so two PRs that are green on their own can no longer break master together or share a version.

Special things to note

  • Needs a repository admin after merging: add a merge queue rule to the master ruleset, with rebase merges, one PR per group, one group building at a time, all-green grouping and a 60-minute check timeout. Adding it first would leave queued PRs waiting for checks that never run.
  • Merge-queue builds use the published snapshot like the snapshot build does, and fail on a mismatch. -Dtycho.baseline=failCommon fails the build when an artifact has a version the published snapshot already has, with different content. Tycho's default only warns and swaps in the published copy. On 28 Sep, fix(xtext): match case-sensitive pattern lookups against the candidate name #1551 and fix(xtext.ui): iterate a snapshot of the matches when showing a running search #1552 were merged 9 s apart, so the runtime feature got one version for two contents. The snapshot build swapped in fix(xtext): match case-sensitive pattern lookups against the candidate name #1551's feature, which pins xtext.ui 17.3.3, and failed to resolve. The last good snapshot swapped 36 artifacts, all identical, so the guard has no false positives there. Because the queue builds one PR at a time and each takes a full CI run, two merges can no longer land in the same minute.
  • PR builds no longer read the published snapshot (-Dtycho.baseline=disable -Dtycho.baseline.replace=none). A PR build only has to show that the PR is correct; the queue checks it against master. Today one bad snapshot fails every open PR, and so does a PR whose commits are older than master's last change to the same feature. The release version check (compare-version-with-baselines) is unchanged.

Change outline

 .github/workflows/verify.yml
+  on: merge_group
   maven-verify:
+    pull_request → -Dtycho.baseline=disable -Dtycho.baseline.replace=none
+    merge_group  → -Dtycho.baseline=failCommon
 .github/workflows/snapshot.yml
+  -Dtycho.baseline=failCommon
flowchart LR
  PR[PR build: no published snapshot] -->|approved + auto-merge| Q[merge queue: one PR at a time]
  Q --> B[queue build = snapshot build<br/>swap + failCommon]
  B -->|green| M[master fast-forwards]
  B -->|red| X[PR leaves the queue, master untouched]
  M --> S[snapshot build publishes]
Loading

🤖 Generated with Claude Code

Run the verify checks on merge_group so master can be gated by a merge
queue that builds one PR at a time on top of the current master.

Merge-queue and snapshot builds keep replacing artifacts with the
published snapshot's, but now fail when a version the snapshot already
has comes with different content (-Dtycho.baseline=failCommon) instead
of silently swapping in the published copy. Two merges within one
minute gave the runtime feature one version for two contents; the
snapshot build then took #1551's feature, which pins xtext.ui 17.3.3,
and failed to resolve the umbrella feature.

PR builds no longer replace anything with the published snapshot, so a
bad or newer snapshot cannot fail an unrelated PR; the queue build
checks the PR against master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joaodinissf
joaodinissf enabled auto-merge (rebase) September 30, 2026 10:41

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant