Skip to content

ci: name merge-queue refs as 1.2.4-queue.N - #160

Merged
dborgards merged 4 commits into
mainfrom
ci/106-merge-queue
Sep 26, 2026
Merged

dborgards merged 4 commits into
mainfrom
ci/106-merge-queue

Conversation

@dborgards

@dborgards dborgards commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

What does this change?

An unmatched gh-readonly-queue/main/pr-<n>-<sha> ref still makes GitVersion 6.8.2 exit 0, so the version job's unversioned fallback never runs. FullSemVer was 1.2.4-gh-readonly-queue-main-pr-<n>-<sha>.1+<commits>: the whole ref as the prerelease, plus build metadata that dotnet pack keeps in the nuspec and drops from the filename. The ref is now 1.2.4-queue.<n>, the same shape as main between releases (-ci) and a pull request (-pr).

eng/verify-merge-queue-version.sh builds a two-pull-request queue ref (the #85 shape) whose name ends in a 40-character sha, runs GitVersion the way Actions does, and checks the result. Locally that printed 1.2.4-queue.419, and main stayed 1.2.4-ci.415. On this pull request's version job it printed 1.2.4-queue.422 and main: 1.2.4-ci.418, and the pull request itself still built as 1.2.4-pr.420.

The main check also accepts a stable X.Y.Z. After a release the tip of main is the tagged commit, and GitVersion reports the tag (1.2.3 on v1.2.3) rather than X.Y.Z-ci.N. Refusing that would fail every version job until the next commit. The queue ref still has to be X.Y.Z-queue.N.

The queue is not live. Nothing here enables it.

Type of change

  • docs / test / refactor / chore / ci — no release

Checklist

  • dotnet build CanKit.Pro.sln -c Release succeeds — not run locally; CI ubuntu-latest, windows-latest and macos-latest passed
  • dotnet test CanKit.Pro.sln -c Release passes — covered by those three CI legs
  • Public API changes are documented with XML comments
  • New behaviour is covered by a test — eng/verify-merge-queue-version.sh, called from the version job
  • The requirement or ADR this relates to is referenced (e.g. FR-RAW-031, ADR-7), if any

Settings still required

Ruleset main-Branch (id 22609422) has no merge_queue rule. Actions filtered by merge_group is still empty. Dietmar has to add the rule; this pull request cannot.

UI: main-Branch ruleset — Settings → Rules → Rulesets → main-Branch → Add rule → merge queue (API type merge_queue, "Merges must be performed via a merge queue").

Set:

  • merge_method: MERGE. The ruleset currently allows merge and squash. A squash through the queue collapses the commits semantic-release reads. The queue's method is the one that lands on main.
  • grouping_strategy: ALLGREEN.
  • min_entries_to_merge: 1, so a single pull request is not held for a batch.
  • max_entries_to_build: 5
  • max_entries_to_merge: 5
  • min_entries_to_merge_wait_minutes: 5
  • check_response_timeout_minutes: 60

Required checks on that ruleset, which the queue uses as-is (there is no second list). The jobs that report them have no event filter, so they already run on merge_group:

  • ubuntu-latest
  • windows-latest
  • macos-latest
  • format

API: PUT /repos/dborgards/CanKit.Pro/rulesets/22609422 replaces the whole ruleset. Keep every existing rule and add:

{
  "type": "merge_queue",
  "parameters": {
    "check_response_timeout_minutes": 60,
    "grouping_strategy": "ALLGREEN",
    "max_entries_to_build": 5,
    "max_entries_to_merge": 5,
    "merge_method": "MERGE",
    "min_entries_to_merge": 1,
    "min_entries_to_merge_wait_minutes": 5
  }
}

What was checked

  • Before this config, GitVersion 6.8.2 on gh-readonly-queue/main/pr-106-deadbeef with GITHUB_ACTIONS=true and origin present returned 1.2.4-gh-readonly-queue-main-pr-106-deadbeef.1+417 and exit 0.
  • Concurrency ci-${{ github.workflow }}-${{ github.ref }} is one group per queue ref, because each entry's github.ref is its own refs/heads/gh-readonly-queue/... branch. That has not been observed in Actions: merge_group has never fired.
  • Checked out v1.2.3 as main: GitVersion reports 1.2.3, and the main pattern accepts it. 1.2.4-queue.N still does not.

Closes #106

Open in Web Open in Cursor 

An unmatched gh-readonly-queue ref still exits GitVersion 0, so the
version job's fallback never runs, and FullSemVer carries the whole ref
plus build metadata. Match the ref explicitly and check that on a
synthetic two-pull-request queue branch.

Co-authored-by: Dietmar Borgards <dborgards@users.noreply.github.com>
@codecov

codecov Bot commented Sep 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dborgards
dborgards marked this pull request as ready for review September 26, 2026 08:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T09:01:12.423797Z 9177cfa Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Co-authored-by: Dietmar Borgards <dborgards@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9177cfae4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread eng/verify-merge-queue-version.sh
cursoragent and others added 2 commits September 26, 2026 10:08
The merge-queue check runs on every version job. After a release, the
tip of main is the tagged commit and GitVersion reports X.Y.Z, not
X.Y.Z-ci.N. Refusing that stopped CI until the next commit on main.

Co-authored-by: Dietmar Borgards <dborgards@users.noreply.github.com>
Co-authored-by: Dietmar Borgards <dborgards@users.noreply.github.com>
@dborgards
dborgards merged commit 2d817a2 into main Sep 26, 2026
14 checks passed
@dborgards
dborgards deleted the ci/106-merge-queue branch September 26, 2026 11:47
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.

CI: the merge queue is wired up in ci.yml but has never run — it is not enabled on the branch

2 participants