-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Error messages when creating build with --image-source and image not found are confusing. #17925
Comments
@gabemontero "no match for xxx" is not an error during resource creation, so it's strange that it's reported as such. As for the message itself, "unable to locate resource for xxx" might be more helpful, or maybe @GrahamDumpleton has a different suggestion for what would be informative to him. It would also be nice if we could skip outputting the "errors occurred while determining argument types" if we ultimately did succeed in resolving the arguments to something. (and only output the errors that occurred while testing the arguments, if verbose logging is enabled). |
The PR I am about to submit no produces this:
|
looks better to me. @GrahamDumpleton ? |
Automatic merge from submit-queue (batch tested with PRs 18454, 18504, 18510, 18481, 18272). adjust newapp/newbuild error messages (arg classification vs. actual … …processing Fixes #17925 @openshift/sig-developer-experience ptal Now produces: ``` gmontero ~/go/src/github.com/openshift/origin (new-app-bld-msgs)$ oc new-build --name imagesourcetest python~https://github.com/openshift-katacoda/blog-django-py --source-image xxx --source-image-path=yyy --dry-run error: unable to locate resource for "xxx" The 'oc new-build' command will match arguments to the following types: 1. Images tagged into image streams in the current project or the 'openshift' project - if you don't specify a tag, we'll add ':latest' 2. Images in the Docker Hub, on remote registries, or on the local Docker engine 3. Git repository URLs or local paths that point to Git repositories --allow-missing-images can be used to force the use of an image that was not matched See 'oc new-build -h' for examples. ```
If using
oc new-build
to create a new build and you want to use the--image-source
and--image-source-path
options, the error messages produced when you pass a name to--image-source
which doesn't match an available image stream are confusing as they point to unrelated issues that do not exist.Version
Steps To Reproduce
Run:
Current Result
Get the error output:
Expected Result
Don't expect to see the middle two messages and expect a more informative error for the real problem referenced in the last message.
Additional Information
None.
The text was updated successfully, but these errors were encountered: