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

Preserve the exit-code for "fail-fast: false" mode #375

Open
arm4b opened this issue Dec 8, 2022 · 5 comments
Open

Preserve the exit-code for "fail-fast: false" mode #375

arm4b opened this issue Dec 8, 2022 · 5 comments
Labels
enhancement ✨ New feature or request good first issue Good for newcomers

Comments

@arm4b
Copy link
Member

arm4b commented Dec 8, 2022

The fail-fast mode will exit with non-zero code immediately when there's an error in deployment. This is as intended.

However, currently, when the fail-fast mode is disabled and there's an error in deployment, BitOps will run until the end and exit with 0 return code like it was a success.

The expectation from the fail-fast: false mode is to run all the deployment steps, but defer the error code (if any) and bubble it up to the BitOps finish exit code. This way we exit with non-zero if some deployment in the middle of the pipeline was unsuccessful.

@arm4b arm4b added the enhancement ✨ New feature or request label Dec 8, 2022
@PhillypHenning
Copy link
Contributor

My question here is; In a list of 4 services, if 2 fails with different codes, which would be reported?

Or is the intention to create a reportable object such as;

service:returncode

{
  "service1": "0",
  "service2": "2",
  "service3": "0",
  "service4": "3",
}

@arm4b
Copy link
Member Author

arm4b commented Dec 8, 2022

For me, any non-zero works great, as long as we don't report "success" if there was an "error".
Even 101, like we did here

sys.exit(101)

@PhillypHenning
Copy link
Contributor

So this is the type of error that I would recommend putting into the doc lookup under an entry like: multiple processing failures, code:101 (or w.e)

But yea I agree with this 👍

@PhillypHenning
Copy link
Contributor

This would be an insanely easy first-issue as well btw

@arm4b
Copy link
Member Author

arm4b commented Dec 9, 2022

Let's add the respective tag then!

@arm4b arm4b added the good first issue Good for newcomers label Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants