-
Notifications
You must be signed in to change notification settings - Fork 261
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
kn service update
should print an error message when invalid or no option is passed
#286
Comments
Shouldn't we just print an error in this case ? like "-100 is an invalid value for max-scale". Anything else would be surprising. |
And then the "unchanged" message is unnecessary (you perfectly can assume that the service is not changed if an error occurs) |
Ah, maybe I mixed up things, so aren't there any strong opinions in current behavior, which silently keeps "unchanged" state if users input invalid values. Can we require to pass at least one option at anytime for avoiding the following case ?
|
Good point. We should catch that and return an error for such a no-op. Of course, when we update with a new value == old value, we should not worry about (and should also print the success message) |
If nobody's working on this, I would like to take it. Thanks!
|
@zhanggbj agreed on the action items. /assign zhanggbj |
kn service update
prints unchanged when nothing is changedkn service update
should print an error message when invalid or no option is passed
@toVersus Sure, no problem! I just noticed your PR, maybe you can refer this issue item in your PR comment so people can know you are working on it :) |
For now if no flag(s) set, service update will still try to do an update, it should return an error instead. [issue 286](knative#286)
For now if no flag(s) set, service update will still try to do an update, it should return an error instead. [issue 286](knative#286)
For now if no flag(s) set, service update will still try to do an update, it should return an error instead. [issue 286](knative#286)
For now if no flag(s) set, service update will still try to do an update, it should return an error instead. [issue 286](knative#286)
For now if no flag(s) set, service update will still try to do an update, it should return an error instead. [issue 286](knative#286)
For now if no flag(s) set, service update will still try to do an update, it should return an error instead. [issue 286](#286)
…tive#286) * complete source code for code coverage project for Knative repos * fix build failure * moved coverage from root dir to /tools/ * fix unit test failure The failure was due to change of directory also added the printing of stderr of failed cmds
In what area(s)?
/kind good-first-issue
/kind feature
Describe the feature:
When users run
kn service update
command with invalid options, nothing is changed. But in current implementation, kn prints the following output:IMO, this is a little confusing behavior. Kn should print
unchanged
when it changed nothing as kubectl does. I think we can implement this feature by comparing the generation before and after updating the service resource and returning changed/unchanged state (boolean).Can I take this, if you can accept this proposal?
The text was updated successfully, but these errors were encountered: