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
Action: Task exit code #13132
Merged
Merged
Action: Task exit code #13132
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following propagates the task result exit code up to the CLI so that a user calling `juju exec` will know that an error occurred in one or more tasks. Prior to this commit, users would have to inspect every result which is a bit disappointing for bash style scripting against the CLI. With this change it should be possible to do the following: $ juju exec --all 'exit 1' $ echo $? # should see 1 This makes juju a lot more powerful to sys or ops users. The code is simple, inspect the result for an exit code. If it exists propagate it to the CLI and return an error stating the fact that a task failed.
achilleasa
reviewed
Jul 2, 2021
achilleasa
reviewed
Jul 2, 2021
achilleasa
reviewed
Jul 2, 2021
achilleasa
reviewed
Jul 2, 2021
The wait-for type isn't used any more, so let's just remove it.
The following updates the error message to identify the task failure and the return code of the failure.
achilleasa
reviewed
Jul 2, 2021
SimonRichardson
commented
Jul 2, 2021
wallyworld
approved these changes
Jul 5, 2021
Give hints about where to go next if there was a failure. This just improves juju usability.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following propagates the task result exit code up to the CLI so that
a user calling
juju exec
will know that an error occurred in one ormore tasks. Prior to this commit, users would have to inspect every
result which is a bit disappointing for bash style scripting against the
CLI. With this change it should be possible to do the following:
This makes juju a lot more powerful to sys or ops users.
The code is simple, inspect the result for an exit code. If it exists
propagate it to the CLI and return an error stating the fact that a task
failed.
QA steps