-
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
tkn bundle build validation #1666
Comments
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/remove-lifecycle stale |
Feature request
Bundle validation, with clearer errors. when creating a bundle its not an option to create without pushing, so there is no way to validate a bundle before attempting to push. This would be great addition to support ci when creating/updating tekton pipelines/tasks.
Use case
When using bundles as the source of truth, creating a pr that updates pipelines and or tasks there is no way to validate that there are any minor mistakes in the manifest. If one where to attempt to check if the bundle builds successfully, they would also be forced to push up to an image registry ( or give a bad registry source and attempt to differentiate between the error of a bad registry name or a parsing error )
Currently the cli either returns a string of the original data passed in, or a json string, depending on where it errors. With neither of these being "pretty" formatted they are hard to read in the terminal, and don't convey any helpful information as to where the error might be. There are 2 different errors that would already be a more helpful if used.
When parsing the yaml ( or potentially json ) the parser gives you an area to look around found here
error converting YAML to JSON: yaml: line 9: mapping values are not allowed in this context
and the second is a print that is a little more opaque, but still more readable and helpful than just a printout of the json and can be found here
There is certainly room for a better ux here, so up to have that conversation, but personally feel even just bubbling up the current already supplied errors would be a help.
UI Example
tkn bundle push <registry> --filenames=<pathtofile> --dry-run
would follow common patterns when interacting with kube resources, but its quite verbose and with the verbpush
and registry argument, it might be more appropriate and clear to end users if we use a new cmdtkn bundle validate --filenames=<pathtofile>
could be nice. 🤷♀️Also worth noting that the filenames flag is plural, however not super clear how to use more then one path ( i have never gotten it to work 😅 ) but that can be its own issue ( or just my user error 😆 )
The text was updated successfully, but these errors were encountered: