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

When user provides invalid files, the error does not mention which files are invalid and why #74

Open
scoheb opened this issue Mar 18, 2019 · 4 comments

Comments

@scoheb
Copy link
Member

scoheb commented Mar 18, 2019

(tmp-XVr6zr33) shebert@localhost/tmp/scott:$ operator-courier -v
1.2.0
(tmp-XVr6zr33) shebert@localhost/tmp/scott:$ operator-courier verify .
ERROR:operatorcourier.identify:Courier requires valid CSV, CRD, and Package files
Courier requires valid CSV, CRD, and Package files

@awgreene
Copy link
Member

Hello @scoheb. This error would result from the following conditions:

  1. A file in the directory is not a valid yaml file.
  2. If the directory only contains valid yaml files, then this log would be produced if none of the following conditions are met:
  • The packageName field doesn't exist.
  • The kind is not set to ClusterServiceVersion or CustomResourceDefintion.

The code that produced this log can be seen here.

We could update the message to report that one of the conditions above was not met.

@scoheb
Copy link
Member Author

scoheb commented Mar 18, 2019

@awgreene The above text would be good to output to the user. Even better would be your suggestion of We could update the message to report that one of the conditions above was not met.

@brianwcook
Copy link

request we say -which- file is not a valid yaml file if possible

@brianwcook
Copy link

also i assume you are using a custom config for linting? I get hard errors from yammlint like

23:81 error line too long (3902 > 80 characters) (line-length)

but obviously this is required due to the base64 encoded images in the yaml. So I think we need detailed yaml lint output reported so we know what issues actually are considered errrors by operator-courier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants