Skip to content

fix(images): emit ::error:: on stdout so the guard failures annotate - #424

Merged
LukasWodka merged 1 commit into
developfrom
fix/annotate-on-stdout
Jul 30, 2026
Merged

fix(images): emit ::error:: on stdout so the guard failures annotate#424
LukasWodka merged 1 commit into
developfrom
fix/annotate-on-stdout

Conversation

@LukasWodka

@LukasWodka LukasWodka commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #422 (thanks for merging). Bugbot found this class on tracebloc/client#497 and I audited my other workflows from today — publish-images.yml had it five times.

GitHub Actions parses workflow commands from stdout only. Every ::error:: in that file went to >&2, so each guard failed the step with no annotation — the reader gets a bare red X and has to dig through the log to find out why. That defeats the point of the carefully-worded refusals:

  • refusing a non-develop/staging ref
  • refusing a non-internal channel tag
  • a build that produced no digest
  • refusing to publish a partial single-arch index (the client#186 ImagePullBackOff guard)
  • a published index missing an arch

All five now write to stdout, so they annotate on the PR/run as intended. No logic change; the messages and exit codes are identical.

actionlint + shellcheck clean at the CI-pinned versions.

Worth knowing for the wider codebase: .github/workflows/merge-settings-drift.yml (already merged) has one instance of the same pattern in its zero-repos guard — I'll fix it separately rather than reach across repos in this PR.


Note

Low Risk
CI-only stderr→stdout tweak for workflow commands; no build, publish, or application logic changes.

Overview
GitHub Actions workflow commands only apply when ::error:: is written to stdout. In publish-images.yml, five guard failures still echoed those lines to stderr (>&2), so steps failed without the intended run/PR annotations.

This change removes >&2 on those echoes only—no change to messages, exit codes, or guard logic. Affected guards: refusing non-develop/staging refs, refusing non-internal channel tags, missing build digest, refusing a partial single-arch manifest merge, and a published index missing linux/amd64 or linux/arm64.

Reviewed by Cursor Bugbot for commit 38daba8. Bugbot is set up for automated code reviews on this repo. Configure here.

All five guard messages in publish-images.yml wrote to stderr, and Actions
parses workflow commands from stdout ONLY -- so each one failed the step
with no annotation, which defeats the point of writing precise refusal
messages (the reader gets a bare red X and has to dig through the log).

Same class Bugbot found in client#497; auditing my other workflows from
today turned up these five.
@LukasWodka

Copy link
Copy Markdown
Collaborator Author

bugbot run

@LukasWodka

Copy link
Copy Markdown
Collaborator Author

👋 Heads-up — Code review queue is at 36 / 30

Above the WIP limit. The team convention is to review existing PRs before opening new work.

Open PRs currently in Code review (oldest first):

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

@cursor cursor 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 38daba8. Configure here.

@LukasWodka
LukasWodka merged commit cc41ddb into develop Jul 30, 2026
15 checks passed
@LukasWodka
LukasWodka deleted the fix/annotate-on-stdout branch July 30, 2026 13:01
LukasWodka added a commit that referenced this pull request Jul 30, 2026
All four annotations in release-image.yml went to stderr, and Actions
parses workflow commands from stdout only -- so the invalid-ref guard, the
PyPI gate timeout (including its re-drive hint) and the no-tags-produced
abort each failed the job with NO annotation. Those are exactly the
messages an operator needs.

Three of the four are the verify-published gate added yesterday, so this is
the same mistake I already fixed in publish-images.yml (#424) and
client#497. Found by Bugbot on data-ingestors#425.
LukasWodka added a commit that referenced this pull request Jul 30, 2026
…#426)

All four annotations in release-image.yml went to stderr, and Actions
parses workflow commands from stdout only -- so the invalid-ref guard, the
PyPI gate timeout (including its re-drive hint) and the no-tags-produced
abort each failed the job with NO annotation. Those are exactly the
messages an operator needs.

Three of the four are the verify-published gate added yesterday, so this is
the same mistake I already fixed in publish-images.yml (#424) and
client#497. Found by Bugbot on data-ingestors#425.
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.

3 participants