You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure workflow status failure if command fails in backendless mode (#1760)
Fixes#1658
Error handling in backendless mode was incorrect, resulting in the
workflow exit status to be success even if the command execution failed.
This patch addresses this issue.
The following are some additional notes of this fix:
- When `allAppliesSuccessful` is false, we need to call
`ReportErrorAndExit()` to ensure that the workflow fails with a
non-zero exit status.
- Since `ReportErrorAndExit()` invokes `os.Exit()` immediately, it
should be called after setting the status of the pull request.
- Contrary to intuition, `atLeastOneApply` is counted even if plan
command, so we need to use `scheduler.IsPlanJobs()` to determine if
the current workflow is plan or apply.
0 commit comments