Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure workflow status failure if command fails in backendless mode
Error handling in backendless mode was incorrect, resulting in a workflow exit status of success even when command execution failed. The fix points are as follows: - `ReportErrorAndExit()` should be called even if `allAppliesSuccessful` is false. - Because `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.
- Loading branch information