fix: report-job-failure cannot post from a node-only image, so it never posts at all #52
Labels
No labels
priority/P0
priority/P1
priority/P2
priority/P3
size/L
size/M
size/S
size/XL
size/XS
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
amtronics/platform-actions#52
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
report-job-failurebuilds its comment body withjqand refuses to post without it:jqis absent fromnode:22-bookworm, and this repository already knows that.release.ymlsays so in a comment, and works around it deliberately:Every reporter consumer on this fleet runs in exactly that image:
So the action exits 0 and posts nothing wherever it is used, and the exit code is success — the failure mode the guard was written to make legible is invisible in practice.
This is not hypothetical: this repository's own
validatehas been a silent no-op since #38 merged. It has not been exercised because everypr.ymlrun since has passed, which is why nobody noticed. The inline reporters it was migrated away from usenode, notcurl+jq, precisely because of this image — the migration replaced a working reporter with one that cannot run there.It also blocks #46: migrating the remaining three consumers as written would silently disable all of them. #46's third acceptance criterion exists to force this decision, and this is the decision it was asking for.
Scope
report-job-failurebuilding its JSON body without requiringjq— preferringjqwhen present and falling back tonode, the same choicerelease.ymlalready makes in this image.curlguard as it is;curlis present in these images.jqinto consumer job containers, which fixes one consumer at a time and leaves the action unusable on a node-only image.Acceptance criteria
nodebut nojq, when the action runs after a failure, then the comment is posted.jq, when the action runs, then the comment is posted and its body is identical to thejq-built one.jqnornode, when the action runs, then it says so and exits 0 without failing the job, as today.amtronics/platform-actions' ownvalidatefails, then a comment appears on the pull request.Notes
The third criterion is the one that matters:
jq --argwas chosen over hand-built JSON because quoting is where this breaks, and any fallback has to be held to the same standard.node -ewithJSON.stringifyis the same guarantee, which is whyrelease.ymluses it.