-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[cli] Improve UX of graceful shutdown message #4064
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tweaked release note entry
Build # 1911 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1911/ to view the results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not an expert in neither modern CLI code nor TS code we use, so can't do real technical review.
As for what I understand it looks good.
@garagatyi I mentioned you if you wanted to check it was now working as you're expecting based the issue you reported. |
- base scripts : catch error code of action lifecycle and return it - cha-lib : return error code based on http error code - display better message when auth is required - skip graceful mode when repo is mounted Change-Id: I1ad021426444b5b4d880df518512e53ef4828336 Signed-off-by: Florent BENOIT <[email protected]>
@@ -29,13 +29,23 @@ cmd_stop() { | |||
FORCE_STOP=false | |||
if [[ "$@" == *"--skip:graceful"* ]]; then | |||
FORCE_STOP=true | |||
elif local_repo; then | |||
warning "Development mode [skip graceful stop]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you do this for local_repo, but not local_assembly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the issue ppl were asking for local repo mode
I'm also ok for local_assembly. I will add
cmd_lifecycle action "graceful-stop" "$@" >> "${LOGS}" 2>&1 || GRACEFUL_STATUS_RESULT=$? | ||
# error on authentication (401 modulo 256 = 145) | ||
if [[ ${GRACEFUL_STATUS_RESULT} -eq 145 ]]; then | ||
error "Authentication failed on the system. Please provide --user and -password values or user --skip:graceful to bypass graceful stop." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Authentication failed during graceful shutdown (hint: --skip:graceful to bypass)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TylerJewell in the issue it was requested to provide the argument for authentication (--user and --password) when auth is required
error "Authentication failed on the system. Please provide --user and -password values or user --skip:graceful to bypass graceful stop." | ||
return 2; | ||
elif [[ ${GRACEFUL_STATUS_RESULT} -ne 0 ]]; then | ||
error "We encountered an error -- see $CHE_HOST_CONFIG/cli.log. Graceful stop can be skipped with --skip:graceful" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"We encountered an error during graceful stop - see $CHE_HOST_CONFIG/cli.log."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we add the hint on the fact that graceful stop can be skipped ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do it have it as (hint: --skip:graceful
does not wait for workspace stop)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/1944/ |
…ipts : catch error code of action lifecycle and return it - cha-lib : return error code based on http error code - display better message when auth is required - skip graceful mode when repo is mounted Change-Id: I4e89605fd3c42ad6ba02115c32297d16f49b3ffe Signed-off-by: Florent BENOIT <[email protected]>
…ipts : catch error code of action lifecycle and return it - cha-lib : return error code based on http error code - display better message when auth is required - skip graceful mode when repo is mounted Change-Id: Icc0caeb4db3dc3a1be802de95bb1f1d505f93b40 Signed-off-by: Florent BENOIT <[email protected]>
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/1952/ |
@TylerJewell updated |
* Fix eclipse-che#1682 : Improve UX of graceful shutdown message - base scripts : catch error code of action lifecycle and return it - cha-lib : return error code based on http error code - display better message when auth is required - skip graceful mode when repo is mounted Change-Id: I1ad021426444b5b4d880df518512e53ef4828336 Signed-off-by: Florent BENOIT <[email protected]>
What does this PR do?
Improve UX of graceful shutdown message
What issues does this PR fix or reference?
codenvy/codenvy#1682
Changelog
Improves UX of graceful shutdown message.
Release Notes
We have made improvements to the CLI graceful shutdown behavior to catch additional errors, communicate more clearly when authentication is required for stop and skip the graceful mode when a repo is mounted.
Docs PR
n/a (improvement on UX, command is the same)
Change-Id: I1ad021426444b5b4d880df518512e53ef4828336
Signed-off-by: Florent BENOIT [email protected]