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

nomad run should return non-zero exit code in case of any errors #11082

Closed
pznamensky opened this issue Aug 25, 2021 · 5 comments · Fixed by #11550
Closed

nomad run should return non-zero exit code in case of any errors #11082

pznamensky opened this issue Aug 25, 2021 · 5 comments · Fixed by #11550
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli type/enhancement
Milestone

Comments

@pznamensky
Copy link

Proposal

Return non-zero exit code in case of any errors during deploying an app.

Use-cases

We switched to nomad run from levant deploy in our CI scripts, but we noticed, that nomad run can return code 0 even when a deployment is failed:

~ $ nomad run my-app.nomad
...
2021-08-25T16:53:10+03:00
ID          = 098fb4b6
Job ID      = my-app
Job Version = 0
Status      = failed
Description = Failed due to progress deadline

Deployed
Task Group  Desired  Placed  Healthy  Unhealthy  Progress Deadline
my-app         1        1       0        1          2021-08-25T16:53:10+03:00

~ $ echo $?
0

Attempted Solutions

Return non-zero code in case of any failures :)

@DerekStrickland DerekStrickland self-assigned this Aug 25, 2021
@DerekStrickland DerekStrickland removed their assignment Aug 27, 2021
@goku321
Copy link

goku321 commented Sep 17, 2021

I'm new to nomad but have experience with Go and k8s. Can I work on this?

@mikenomitch
Copy link
Contributor

Hey @goku321, please feel free to take this one. We would love to see a community PR for this!

Because this changes the external interface for the command, I think we might wait to implement this until a major release, but I think this is a good idea.

Good luck!

@goku321
Copy link

goku321 commented Sep 24, 2021

Thank you, @mikenomitch

@lgfa29 lgfa29 added stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli labels Oct 2, 2021
@tgross
Copy link
Member

tgross commented Dec 9, 2021

Fixed in #11550 and will ship in the next planned patch release.

@tgross tgross added this to the 1.2.3 milestone Dec 9, 2021
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli type/enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants