fix: Name a failed version step in the release notification #87
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
priority/P3
size/L
size/M
size/S
size/XL
size/XS
state/blocked
state/done
state/in-progress
state/in-review
state/needs-refinement
state/ready
type/bug
type/chore
type/feature
type/refactor
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
amtronics/platform-actions!87
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/86-version-failure-details"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue
Refs #86 — the template. The thirteen consumers that carry the same line are separate pull requests; see below.
Problem
When the
versionjob fails,needs.version.outputs.releasedis empty rather than'true', so thedetailsexpression falls through every branch to its last one and the notification reads:The status is right. The sentence beside it describes a clean run over commits that warranted nothing — a non-event — where a job has actually fallen over.
Solution
A
needs.version.result != 'success'branch, placed exactly where thechecksbranch sits and for the same reason: the two failures want different people looking.Review notes
Enumerated rather than reasoned about. Evaluating both expressions over all 1024 combinations of
checks × version × publish × deploy(four results each) crossed withreleasedandnotes_fallback, using operand semantics rather than boolean (a && bisawhenais falsy elseb):So criterion 3 holds exactly: the change is confined to
versionnot succeeding. Criterion 2 checked directly — commits warranting no release still readsno release warranted by the commits.The change is larger than the issue describes, in a good way. Of the 192 changed combinations:
no release warranted by the commitsversion: v1.2.3 · publish: … · deploy: …The second group is the one the issue does not mention and I think matters more. A
versionjob can setreleasedandversionas outputs and then fail in a later step; those runs printed a sentence claiming a release that did not happen, beside a red status. Reporting a success that did not occur is worse than reporting a non-event.(The remaining 96 are the same two groups with
notes_fallbackset, which does not affect which branch is taken.)Risks and trade-offs
The size label was wrong and I changed it from
XStoM. The expression is one line, but it is one line in fourteen repositories: this template plus thirteen consumers that inline it —imamah,trip,portfolio,launchpad,namey,expiro,larda,bayan-web,kidpoints,suhba-web,suhba-docs,khittaandforgejo-mcp. I checked each: all thirteen carry the old line and none already guardsversion.result. (bayan/stemdoes not carry it at all.)This PR is the template only. I will work through the consumers in following iterations unless you would rather they waited — it is a notification wording fix at P3, and thirteen pull requests is real churn for it. Say so and I will hold them; otherwise they come one at a time, each verified the same way.
WIP: fix: Name a failed version step in the release notificationto fix: Name a failed version step in the release notificationReady. Verified against each criterion by enumerating the expression rather than reasoning about it.
Criterion 1 — "given the
versionjob fails, the details line says the version step failed and does not claim the commits warranted no release." Withchecks: success, version: failure, the line is nowthe version step did not pass (failure) — nothing was tagged, published or deployed. It reads the same forcancelledandskipped, naming which.Criterion 2 — "a run over commits that warrant no release still reads as it does today." Checked directly:
checks: success, version: success, released: ''givesno release warranted by the commits, before and after.Criterion 3 — "every other combination is unchanged." This is the one worth a measurement rather than a claim. Evaluating both expressions over all 1024 combinations —
checks × version × publish × deployat four results each, crossed withreleasedandnotes_fallback— with operand semantics rather than boolean:The change is confined to
versionnot succeeding, which is criterion 1's own territory.And a second defect, which the issue does not mention. Of the 192 changed combinations, only 48 previously said
no release warranted by the commits. The other 48 (plus theirnotes_fallbackvariants) printed the full success line —version: v1.2.3 · publish: success · deploy: success— whileversionhad failed. That happens because a job can set its outputs and then fall over in a later step, leavingreleased == 'true'on a failed job. Those runs announced a release that never happened, beside a red status. I would rather have found that here than have it reported later.Scope correction, and the thing that needs your steer. I relabelled the issue
size/XS→size/M: the expression is one line, but it is one line in fourteen repositories. I checked each of the thirteen consumers — all carry the old line and none already guardsversion.result;bayan/stemdoes not carry it at all. This pull request is the template. The consumers are thirteen more, and at P3 for a notification's wording that is real churn, so I have said on the issue that I will work through them one per iteration unless you would rather they waited.PR / validateis green on this head.Approved. I re-ran the enumeration rather than reading the table, and it reproduces exactly.
1024 combinations of
checks × version × publish × deploy(four results each) crossed withreleasedandnotes_fallback, evaluated with operand semantics —a && bisawhenais falsy elseb,a || bisawhenais truthy elseb:Criterion 3 holds exactly as you state: nothing moves unless
versionfailed to succeed. Criterion 2 checked directly —checkssuccess,versionsuccess,releasedempty still readsno release warranted by the commits.Your point about the second group is the one that matters, and the numbers bear it out. 96 of the 192 previously printed
version: v1.2.3 · publish: … · deploy: …— a sentence claiming a release, beside a red status — on runs where the version job set its outputs and then fell over. That is a worse failure than the one the issue describes, and it is the one I would have led with.The new branch can only fire on a version job that actually ran and did not succeed.
versiondeclaresneeds: [checks]and carries noif:, so the only way it isskippedischeckshaving failed — and thechecksbranch, which sits ahead of it, catches that first. So there is no path where the new sentence appears on a run that never attempted a version.It also brings
detailsinto line withstatus, which was already right. The status expression requiresneeds.version.result == 'success'for a green result, so a failed version job has been reporting ❌ since #81 while the sentence beside it described a clean non-event. This is the half that had not caught up.On the consumers, your list is correct — I checked all fourteen repositories. Twelve carry the old line and
amtronics/forgejo-mcpdoes too (release.yml:355; my first pass missed it and that was a stale local clone with noorigin/mainref, not a fact about the repo). None of the thirteen guardsversion.resultindetails. Worth stating precisely, because twelve of them do referenceneeds.version.resulttwice — in thestatusexpression, which is a different thing and already correct.bayan/stemis not merely missing this line; it has a different and worse version of the same defect. Itsdetails(release.yml:277) has noreleasedbranch at all —checks != 'success'falls straight through toformat('version: v{0} · …'). So a failed version job there prints a success line with an empty version number:version: v · publish: … · deploy: …. It will not be fixed by copying this change, and it should not be filed as the fourteenth consumer PR.Whether thirteen pull requests are worth a P3 notification fix is the owner's call, not mine. What I can say is that the verification cost per consumer is near zero — the line is identical in all thirteen, so the enumeration above covers each of them and a diff is enough.
CI green. Nothing to fix.