You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 45523d7
Browse filesBrowse the repository at this point in the historyBrowse files
fix(release): follow the kind/ backport label rename in backport-audit
The labels this tool queries were namespaced under kind/ in 7b71053,
which renamed them in place through label-sync aliases. Every
historical PR now reads back as kind/backport or kind/backport-previous,
so `gh pr list --label backport` returns 7 of the 290 merged PRs that
carry a backport request.
That is the worst shape this failure could take. Against release-1.6
and release-1.5 the audit found 2 candidates, judged both already
backported, and exited 0 -- a clean bill of health for two branches
that between them have 5 MISSING and 7 pending backports. A gate that
reports success because it stopped seeing the work is worse than no
gate at all.
Query both spellings per request and fold them onto the kind/ name,
which is also the name the audit reports. The bare names stay because
the org-level dosubot still applies them to new PRs; backport.yaml
carries the same transitional pair for the same reason, and both
retire together.
Deliberately not changed: the rule that resolves a label to a release
line. backport.yaml dropped getLatestRelease in 6ff5b98 and now takes
the two newest existing release-X.Y branches, which opens a line at its
first rc rather than at its first stable. The two rules agree outside a
freeze window and no window has opened since that commit, so every PR
audited so far merged under the rule reproduced here. The divergence is
recorded in the README and on lineOpenDates; the next rc cut is what
makes it matter.
After the fix: 290 candidates scanned, release-1.6 3 MISSING / 4
pending, release-1.5 2 MISSING / 3 pending / 5 dropped, exit 1.
Assisted-By: Claude <[email protected]>
Signed-off-by: Myasnikov Daniil <[email protected]>
Copy file name to clipboardExpand all lines: cmd/backport-audit/README.md
+21-17Lines changed: 21 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,17 @@
2
2
3
3
Answers one question, before a release or an rc is cut: did everything labelled for backport actually land on the release branch? It prints the URLs of the ones that did not, and exits non-zero, so it can gate the cut.
4
4
5
-
The manual alternative is `gh pr list --search "is:merged label:backport"`, which lists every PR ever labelled and says nothing about whether the change reached the branch. Answering that by hand means reading the branch history per PR, which is where backports quietly go missing.
5
+
The manual alternative is `gh pr list --search "is:merged label:kind/backport"`, which lists every PR ever labelled and says nothing about whether the change reached the branch. Answering that by hand means reading the branch history per PR, which is where backports quietly go missing.
#3449 ci(release): move release validation to rc time — e2e lane, changelog button, promote gate, docs at promote
15
+
label=kind/backport-previous author=myasnikovdaniil merged=2026-07-29 -- no backport PR, nothing on branch
16
16
```
17
17
18
18
The URL is always the **original PR on main** — the thing you decide about. The evidence line names the backport PR when one exists. Anything already on the branch is counted in the header and never listed, so silence means done.
@@ -61,9 +61,13 @@ go run ./cmd/backport-audit release-1.5 || echo "do not cut yet"
61
61
62
62
## How a PR is matched to a release line
63
63
64
-
A `backport` label does not name a branch. [`backport.yaml`](../../.github/workflows/backport.yaml) resolves the target from `getLatestRelease`**at merge time**, so the same label means `release-1.5` on a PR merged in June and `release-1.6` on one merged in August.
64
+
A `kind/backport` label does not name a branch. [`backport.yaml`](../../.github/workflows/backport.yaml) resolves the target from `getLatestRelease`**at merge time**, so the same label means `release-1.5` on a PR merged in June and `release-1.6` on one merged in August.
65
65
66
-
The audit reproduces that rule rather than trusting the label text: a PR is a candidate for `release-X.Y` when it merged carrying `backport` while `X.Y` was the current line, or `backport-previous` while `X.Y` was one minor behind. A line is treated as current from the publication of its first non-prerelease release, which is what `getLatestRelease` returns. Without this, auditing an older line reports every newer-era `backport` PR as missing.
66
+
The audit reproduces that rule rather than trusting the label text: a PR is a candidate for `release-X.Y` when it merged carrying `kind/backport` while `X.Y` was the current line, or `kind/backport-previous` while `X.Y` was one minor behind. A line is treated as current from the publication of its first non-prerelease release, which is what `getLatestRelease` returns. Without this, auditing an older line reports every newer-era `kind/backport` PR as missing.
67
+
68
+
The labels were namespaced under `kind/` in 7b71053a0, which renamed them in place via label-sync aliases, so every historical PR reads back under the new name. The bare `backport` and `backport-previous` are still queried alongside them, because the org-level dosubot goes on applying the old spelling to new PRs — the same transitional allowance [`backport.yaml`](../../.github/workflows/backport.yaml) makes, and it retires at the same time. A PR found under either spelling is reported under the `kind/` one.
69
+
70
+
One divergence is open and deliberate. `backport.yaml` stopped calling `getLatestRelease` in 6ff5b98d5 and now takes the two newest existing `release-X.Y` branches, which opens a line at its first rc rather than at its first stable. The two rules agree outside a freeze window, and no window has opened since that commit, so every PR audited so far merged under the rule reproduced here — the next rc cut is what makes them disagree.
67
71
68
72
## How landing is established
69
73
@@ -92,18 +96,18 @@ Output is an object keyed by branch, each holding one record per candidate:
92
96
93
97
```json
94
98
{
95
-
"number": 3372,
96
-
"title": "fix(keycloak-configure): patch HelmRelease in release namespace on teardown",
A `MISSING` verdict is a prompt to check, not proof of absence. A hand-backport that was squash-merged, reworded, and referenced no original PR is invisible to every evidence layer and reads as `MISSING`; confirm at diff level before redoing the work. A `backport` label added long after merge, once the release line has moved on, resolves to the newer line. And the audit reports *that* something is missing, never *why* — a run of `MISSING` entries clustered in time usually means the bot itself was failing during that window, which is worth checking before cherry-picking them one by one.
113
+
A `MISSING` verdict is a prompt to check, not proof of absence. A hand-backport that was squash-merged, reworded, and referenced no original PR is invisible to every evidence layer and reads as `MISSING`; confirm at diff level before redoing the work. A `kind/backport` label added long after merge, once the release line has moved on, resolves to the newer line. And the audit reports *that* something is missing, never *why* — a run of `MISSING` entries clustered in time usually means the bot itself was failing during that window, which is worth checking before cherry-picking them one by one.
Copy file name to clipboardExpand all lines: docs/agents/releasing.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,5 +27,5 @@ The release process is promotion-based — a stable release is a renamed release
27
27
28
28
All detailed steps, workflows, and failure modes are documented in `docs/release.md`.
29
29
30
-
For a patch release, or any rc cut from a `release-X.Y` branch, verify the backport state of that branch before tagging: `go run ./cmd/backport-audit release-X.Y` exits non-zero while anything labeled `backport` / `backport-previous` for the line has not landed on it, and prints the URLs. See [`cmd/backport-audit/README.md`](../../cmd/backport-audit/README.md) and [Cherry-pick triage before a patch](../release.md#cherry-pick-triage-before-a-patch). Do not report a branch as ready to cut on the strength of `gh pr list --search "is:merged label:backport"` — that lists what was labeled, not what arrived.
30
+
For a patch release, or any rc cut from a `release-X.Y` branch, verify the backport state of that branch before tagging: `go run ./cmd/backport-audit release-X.Y` exits non-zero while anything labeled `kind/backport` / `kind/backport-previous` for the line has not landed on it, and prints the URLs. See [`cmd/backport-audit/README.md`](../../cmd/backport-audit/README.md) and [Cherry-pick triage before a patch](../release.md#cherry-pick-triage-before-a-patch). Do not report a branch as ready to cut on the strength of `gh pr list --search "is:merged label:kind/backport"` — that lists what was labeled, not what arrived.
gh pr list --state open --base main --label kind/bug
402
402
```
403
403
404
-
Step 1 covers the labeled work: [`backport-audit`](../cmd/backport-audit/README.md) resolves each `backport` / `backport-previous` PR to the line the label meant **at merge time** (the same `getLatestRelease` rule the bot applies, not the label text), then reports each one as already on the branch, `pending` on an open backport PR, `dropped` with the reason someone recorded, or `MISSING`. Listing the labeled PRs with `gh pr list --search "is:merged label:backport"` is not a substitute — it says nothing about whether the change reached the branch, which is the only thing that matters at this point in the cut. Steps 2 and 3 remain necessary because they cover what step 1 structurally cannot see: changes that were never labeled at all.
404
+
Step 1 covers the labeled work: [`backport-audit`](../cmd/backport-audit/README.md) resolves each `kind/backport` / `kind/backport-previous` PR to the line the label meant **at merge time**, not from the label text, then reports each one as already on the branch, `pending` on an open backport PR, `dropped` with the reason someone recorded, or `MISSING`. It takes that line from the newest stable published at merge time — the `getLatestRelease` rule the bot applied until the branch enumeration described in [The backport bot](#the-backport-bot) replaced it — so the two agree except inside a freeze window, where the audit is one line behind the bot. Listing the labeled PRs with `gh pr list --search "is:merged label:kind/backport"` is not a substitute — it says nothing about whether the change reached the branch, which is the only thing that matters at this point in the cut. Steps 2 and 3 remain necessary because they cover what step 1 structurally cannot see: changes that were never labeled at all.
0 commit comments