Skip to content

Report dynamic config continued workflow failure in run watch - #1650

Draft
gcirclest wants to merge 1 commit into
mainfrom
dynamic-config-report
Draft

Report dynamic config continued workflow failure in run watch#1650
gcirclest wants to merge 1 commit into
mainfrom
dynamic-config-report

Conversation

@gcirclest

Copy link
Copy Markdown
Contributor

Summary

  • deriveDisplayStatus previously returned "succeeded" as soon as it found any workflow with outcome == "succeeded", so in a dynamic config pipeline the setup workflow's success masked the continued workflow's failure
  • Now uses the last workflow's status (the most recently started one) as the overall run status — in dynamic config the continued workflow is always last in the V3 API response
  • A not_run or other non-succeeded outcome on the continued workflow now correctly causes run watch to exit 1

Test plan

  • New acceptance test TestRunWatch_DynamicConfig_ContinuedWorkflowValidationError: setup workflow ended/succeeded, continued workflow ended/not_run → exit code 1 and "failed" in output
  • Existing watch acceptance tests all pass

In dynamic config, when the continued workflow's config fails validation:
- The error is recorded on the run itself (r.Errors); no continued
  workflow object is created
- Even when a continued workflow IS created, it will have a non-succeeded
  outcome (e.g. "not_run")

Previously, deriveDisplayStatus returned "succeeded" as soon as it found
any workflow with outcome "succeeded" — the setup workflow — missing both
cases above.

Now:
- Run-level errors are checked first and short-circuit to "errored", so
  a config validation error on the run is always surfaced
- The last workflow's outcome is used for the final verdict (setup then
  continue, API returns in creation order), so a not_run continued
  workflow is not masked by the setup workflow's success
- watchFinalResult includes any run-level error messages in the output
  so the user sees what went wrong, not just "run failed"
@gcirclest
gcirclest force-pushed the dynamic-config-report branch from ea4b751 to 94f3988 Compare July 27, 2026 13:55
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.

1 participant