Skip to content
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

Better error when incorrect component type has been specified #3128

Closed
elsony opened this issue May 8, 2020 · 1 comment · Fixed by #3265
Closed

Better error when incorrect component type has been specified #3128

elsony opened this issue May 8, 2020 · 1 comment · Fixed by #3265
Assignees
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug.
Projects

Comments

@elsony
Copy link

elsony commented May 8, 2020

/kind bug

What versions of software are you using?

1.2

Operating System:
mac

Output of odo version:

How did you run odo exactly?

When I specified a wrong component type name during on create in the devfile scenario, the error message that comes back does not clearly point out on what may have caused the problem.

Actual behavior

eyuentp2:springboot-ex eyuen$ odo create java-sprint-boot myspring
Experimental mode is enabled, use at your own risk

Validation
 ✗  Checking devfile compatibility [42454ns]

Please run 'odo catalog list components' for a list of supported devfile component types
 ✗  imagestreams.image.openshift.io "java-sprint-boot" not found
eyuentp2:springboot-ex eyuen$ odo create java-spring-boot myspring

Expected behavior

It should return a more direct error that indicates the component type does not exists.

Any logs, error output, etc?

See actual behaviour section

/area devfile

@openshift-ci-robot openshift-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. labels May 8, 2020
@elsony elsony added this to For consideration in Sprint 184 via automation May 8, 2020
@girishramnani girishramnani moved this from For consideration to To do in Sprint 184 May 14, 2020
@johnmcollier
Copy link
Member

johnmcollier commented May 19, 2020

So the root issue of this is that we always fall back to checking for an s2i image stream of that name, if a devfile component wasn't found. And if no s2i imagestream is found, we output the above error message, which may be confusing to the user.

We discussed on an earlier team meeting and decided to change the error message that gets printed when experimental mode is enabled and no devfile component or image stream was found:

Before

 ✗  imagestreams.image.openshift.io "java-sprint-boot" not found

After

 ✗  component "java-sprint-boot" not found

If experimental mode is not enabled, the original error message would still show up.

@kadel @elsony Any concerns with that?

@elsony elsony moved this from To do to In progress in Sprint 184 May 26, 2020
@elsony elsony moved this from In progress to For review in Sprint 184 May 28, 2020
@girishramnani girishramnani removed this from For review in Sprint 184 Jun 1, 2020
@girishramnani girishramnani added this to For consideration in Sprint 185 via automation Jun 1, 2020
@girishramnani girishramnani moved this from For consideration to For review in Sprint 185 Jun 1, 2020
Sprint 185 automation moved this from For review to Done Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug.
Projects
No open projects
Sprint 185
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants