Skip to content

Improve error messages in olm-catalog file generation #1281

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

Closed
lilic opened this issue Apr 3, 2019 · 2 comments
Closed

Improve error messages in olm-catalog file generation #1281

lilic opened this issue Apr 3, 2019 · 2 comments
Labels
olm-integration Issue relates to the OLM integration

Comments

@lilic
Copy link
Member

lilic commented Apr 3, 2019

Feature Request

Is your feature request related to a problem? Please describe.
When trying to generate the olm-catalog and there is a problem with something in the yaml manifests, the error message should include which file the problem happened in.

Describe the solution you'd like
For example when running the following command I would like to see the information about the file path and filename included in the error message, currently I just can see the problem is on line 7 of a file:

operator-sdk olm-catalog gen-csv --csv-version 0.1.0
INFO[0000] Generating CSV manifest version 0.1.0
Error: catalog scaffold failed: (error converting YAML to JSON: yaml: line 7: did not find expected key)
Usage:
  operator-sdk olm-catalog gen-csv [flags]
@lilic
Copy link
Member Author

lilic commented Apr 3, 2019

cc @estroz I am sure there can be other improvements we can make in error msgs in the generation, but this one I came across a few times.

@lilic lilic added the olm-integration Issue relates to the OLM integration label Apr 3, 2019
@hasbro17
Copy link
Contributor

hasbro17 commented Apr 4, 2019

We should probably strive to be more generous with wrapping errors with some context everywhere we return them.
With something like errors.Wrap().
Of course the flip side to that is error messages that can become too verbose but with some judgement there's probably a healthy balance we can strive for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
olm-integration Issue relates to the OLM integration
Projects
None yet
Development

No branches or pull requests

2 participants