-
Notifications
You must be signed in to change notification settings - Fork 250
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
Improve the error message on pipeline create #316
Improve the error message on pipeline create #316
Conversation
I think #311 is related would be nice if we get this fixed everywhere, /cc @danielhelfand |
I agree that it would be nice to fix other error messages, I was a bit lazy - only fixed the one I encountered :P About #311, I think the list and create commands are a bit different use cases. For the create, For the list case, we don't expect anything specific, so if we don't get anything we can get a message that nothing was found, but that's for information only. To be honest my preference there would be to get no message at all, or if we do get a message get it on stderr - so that it's possible to reliably parse the stdout if needed. |
I think #311 should have a completely different error message that is specific to the namespace. This is more specific to the pipeline name not existing in a valid namespace, but I do think it more clearly communicates the issue to the user. |
let me know if that's good to go for you guys ? |
I've been looking at different commands, and the errors returned a bit mixed up in style: On pipeline commands:
On task commands:
There are more commands for other resources too, I did not check them all; but it looks to me as if it would be best to agree on a common approach for the error message returned by commands, and then align them all. We could have one shared function used for logging for instance. My proposal would be:
|
ec84214
to
63be16e
Compare
If the pipeline is not found on pipeline create, it may be due to a misspelled pipeline name or namespace name. Include both in the error message to help troubleshooting.
When creating a pipelinerun out of a pipeline, the cli outputs the command to follow the pr logs, which is very handy, only it does not include the namespace. Fixing that.
63be16e
to
aaa0f45
Compare
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afrittoli, vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
If the pipeline is not found on pipeline create, it may be due to
a misspelled pipeline name or namespace name. Include both in the
error message to help troubleshooting.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide
for more details.