Skip to content

CI: report real job results in the build notification - #602

Merged
jglanz merged 1 commit into
masterfrom
fix/cicd-notification-job-results
Sep 8, 2026
Merged

CI: report real job results in the build notification#602
jglanz merged 1 commit into
masterfrom
fix/cicd-notification-job-results

Conversation

@heifner

@heifner heifner commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

all-passing passed job-results as a comma-separated list. Wire-Network/notification-action word-splits that input on whitespace and matches each word against ^([^:]+):([^:]+)$, so a comma-separated list arrives as a single multi-colon word, matches nothing, and parses to {}. Every status probe against {} is false, so the action fell through to its else branch and posted ✅ SUCCESS to Mattermost regardless of what the jobs did.

Run 34144933071 failed its gcc build leg and reported green; the notification log shows Result: {} followed by Overall: SUCCESS. This has been the behaviour for every failing build on this workflow.

The merge gate was never affected. The trailing run: false step failed the job correctly and the run showed red on GitHub — only the chat message was wrong.

What changed

job-results moves to the space-separated form the action actually parses. JSON is not a usable alternative: the action interpolates the input unquoted into a double-quoted shell assignment, which strips the inner quotes and yields invalid JSON that fails in exactly the same way.

platform-cache and v are now reported and gated on. Both feed build-test-package, so a failure in either leaves the build skipped and the notification naming a job that never ran. Neither can report skipped itself — v is unconditional, and platform-cache's Discover Platforms job has no if: — so gating on them introduces no false reds.

Relationship to the action fix

Wire-Network/notification-action#1 makes the action accept commas and fail closed, which fixes this repository's notifications on its own. The two changes are deliberately redundant so neither has to land first. This repository pins the action by SHA, so it does not pick up that fix until the pin is bumped; this PR is what corrects the reporting in the meantime.

The `all-passing` job passed `job-results` as a comma-separated list. Wire-Network/notification-action word-splits that input on whitespace and matches each word against `^([^:]+):([^:]+)$`, so a comma-separated list arrives as a single multi-colon word, matches nothing, and parses to `{}`. Every status probe against `{}` is false, so the action fell through to its `else` branch and posted `✅ SUCCESS` to Mattermost regardless of what the jobs did. Run 34144933071 failed the gcc build leg and still reported success.

Switch to the space-separated form the action actually parses. JSON is not a usable alternative here: the action interpolates the input unquoted into a double-quoted shell assignment, which strips the inner quotes and yields invalid JSON that fails the same way.

Also report `platform-cache` and `v`, and gate on them. Both feed `build-test-package`, so a failure in either leaves the build `skipped` and the notification naming a job that never ran. Neither can report `skipped` itself — `platform-cache`'s `Discover Platforms` and `v` are unconditional — so gating on them adds no false reds.

The merge gate was never affected; the trailing `run: false` step failed the job correctly and the run showed red on GitHub. Only the chat message was wrong.
@jglanz
jglanz merged commit 210153e into master Sep 8, 2026
12 checks passed
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.

2 participants