ci: name merge-queue refs as 1.2.4-queue.N - #160
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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>
There was a problem hiding this comment.
💡 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".
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>
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 was1.2.4-gh-readonly-queue-main-pr-<n>-<sha>.1+<commits>: the whole ref as the prerelease, plus build metadata thatdotnet packkeeps in the nuspec and drops from the filename. The ref is now1.2.4-queue.<n>, the same shape asmainbetween releases (-ci) and a pull request (-pr).eng/verify-merge-queue-version.shbuilds 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 printed1.2.4-queue.419, andmainstayed1.2.4-ci.415. On this pull request's version job it printed1.2.4-queue.422andmain: 1.2.4-ci.418, and the pull request itself still built as1.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.3onv1.2.3) rather thanX.Y.Z-ci.N. Refusing that would fail every version job until the next commit. The queue ref still has to beX.Y.Z-queue.N.The queue is not live. Nothing here enables it.
Type of change
docs/test/refactor/chore/ci— no releaseChecklist
dotnet build CanKit.Pro.sln -c Releasesucceeds — not run locally; CIubuntu-latest,windows-latestandmacos-latestpasseddotnet test CanKit.Pro.sln -c Releasepasses — covered by those three CI legseng/verify-merge-queue-version.sh, called from the version jobFR-RAW-031,ADR-7), if anySettings still required
Ruleset
main-Branch(id22609422) has nomerge_queuerule. Actions filtered bymerge_groupis 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 allowsmergeandsquash. A squash through the queue collapses the commits semantic-release reads. The queue's method is the one that lands onmain.grouping_strategy: ALLGREEN.min_entries_to_merge: 1, so a single pull request is not held for a batch.max_entries_to_build: 5max_entries_to_merge: 5min_entries_to_merge_wait_minutes: 5check_response_timeout_minutes: 60Required 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-latestwindows-latestmacos-latestformatAPI:
PUT /repos/dborgards/CanKit.Pro/rulesets/22609422replaces 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
gh-readonly-queue/main/pr-106-deadbeefwithGITHUB_ACTIONS=trueandoriginpresent returned1.2.4-gh-readonly-queue-main-pr-106-deadbeef.1+417and exit 0.ci-${{ github.workflow }}-${{ github.ref }}is one group per queue ref, because each entry'sgithub.refis its ownrefs/heads/gh-readonly-queue/...branch. That has not been observed in Actions:merge_grouphas never fired.v1.2.3as main: GitVersion reports1.2.3, and the main pattern accepts it.1.2.4-queue.Nstill does not.Closes #106