-
Notifications
You must be signed in to change notification settings - Fork 263
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
Confusing Error Message When Using kn service update #829
Comments
It's indeed confusing here, but it's hard or even impossible for Maybe instead of
rephrasing this to
sounds better ? Happy for any other suggestion, though. |
In kubectl , it raises |
I think we should document quoting space separated flag values. Handling at kn level (instead of cobra) would bring multiple combinations to handle and complexity. Ideally, the error message should come from the flag parsing library where it recognizes the pattern where command requires arg(s) and there are multiple values passed after |
Agree on this. Would be great if there was some flag-level validation on this, but I also think I can agree that a documented example might be the best way to go here. I realize this issue is a bit nitpicky as far as this error is concerned. |
I don't think this is easily possible as it is pefectly valid to use a command like But the error message should be better. Like when multiple arguments are given we can say: "Only one argument for the name is allowed, but multiple are given: 'helloworld-go Sample v2'. Maybe you have forgotten to quote a flag value ?" |
Repeating the detected arguments in the error message might be just good enough. |
This issue is stale because it has been open for 90 days with no |
Reopen it as I think we can still do better with the error message. |
This issue is stale because it has been open for 90 days with no |
* Tekton test - ClusterRoleBinding v1 * make it compatible with Kubernetes 1.22 * TMP: Test Tekton in presubmits * Revert "TMP: Test Tekton in presubmits" This reverts commit 8996ac7. Co-authored-by: Martin Gencur <[email protected]>
Bug report
When using
kn service update
with thehelloworld-go
service example, an odd error response comes when you run the following:The issue has nothing to do with the service name argument. The issue is that
--env TARGET=Go Sample v2
should be a string:--env TARGET="Go Sample v2"
.Possibly related to #762 and #778.
Expected behavior
An error message along the lines of
--env TARGET must be a string
.It seems as if this error comes up as unexpected in an area where a hard coded error message is in place for a specific issue.
Steps to reproduce the problem
helloworld-go
service mentioned abovekn service update helloworld-go --env TARGET=Go Sample v2
without double quotes around the value ofTARGET
.kn version
Knative (serving/eventing) version
Serving: v0.14.0
The text was updated successfully, but these errors were encountered: