fix(ui): show a failed promotion step's own error message - #6857
Conversation
The alert under a failed step read promotion.status.message, which keeps changing as later steps execute and, for a continueOnError step, never reflects that step at all. Read status.stepExecutionMetadata[i].message instead, so each failed step shows the error that actually caused it. The promotion-level message keeps its place after the last step, shown only when no step surfaced an error of its own -- which is how the abort, pre-step and workdir failures stay visible. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
✅ Deploy Preview for docs-kargo-io ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
This is how UI interprets now: Each individual step which is terminal + not-succeeded will carry error message and UI will show it below that promotion step. In this case - terminal or non-terminal promotion will carry When promotion is terminal + not-succeeded and if none of promotion step carries any message, then only |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6857 +/- ##
=======================================
Coverage 31.13% 31.13%
=======================================
Files 832 832
Lines 81235 81235
=======================================
Hits 25294 25294
Misses 54470 54470
Partials 1471 1471 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
The step message is now correct, however when I abort a promotion I no longer see |
|
@hairyhum I tried and it is showing. Maybe be there is some edge case I am missing. Can you share the promotion manifest for the terminated message not showing up?
|
|
I'm running this: And this is how promotion looks like: |
|
Oh okay now I know the reason @hairyhum We still need to show |
Split the promotion-level message visibility check into per-phase cases. Failed and Errored keep suppressing the message when the failing step already displays it, but an abort is not attributable to any one step, so its message is always shown. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>



Closes #6851
The alert under a failed step read
promotion.status.message. That message keeps changing as later steps execute, so it flickers; withcontinueOnErrorit never reflects the failed step at all; and with multiple failures it showed one step's error under every failed step, leaving the others unreachable. It now readsstatus.stepExecutionMetadata[i].message.Working through it, we found the old alert was also serving as the promotion-level message, anchored under the last step -- which is why
Erroredwas excluded from the bottom alert. So repointing the inline alert left that message homeless. It keeps its place after the last step, now shown only when no step surfaced an error of its own.That last condition is structural rather than a text comparison, following the backend's branches:
DetermineFinalPhasecopies the worst step's message verbatim (already inline), while abort, pre-step and workdir failures leave the step message empty and so still render. Known gap: a panic or status-patch failure after a step failed is suppressed -- recovering it needs provenance the status doesn't carry, so it belongs backend-side.Also fixes duplicate React keys when
continueOnErrorlets two steps fail.Test plan
pnpm typecheck,pnpm lint,pnpm vitest run(277 pass) -- all cleanNo unit test:
ui/has vitest only, no jsdom/RTL, and the fix is inline rather than an extracted helper.🤖 Generated with Claude Code