Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch diggerhq/digger#1760 #1

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Conversation

minamijoyo
Copy link
Owner

@minamijoyo minamijoyo commented Oct 23, 2024

No description provided.

Fixes diggerhq#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.
@minamijoyo minamijoyo merged commit 96fc752 into patched Oct 23, 2024
6 of 9 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.

1 participant