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

tkn bundle build validation #1666

Open
williamlfish opened this issue Aug 2, 2022 · 2 comments
Open

tkn bundle build validation #1666

williamlfish opened this issue Aug 2, 2022 · 2 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@williamlfish
Copy link
Contributor

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

v1beta1.Task.Spec: readObjectStart: expect { or n, but found [, error found in #10 byte of ...|},"spec":[{"default"|..., bigger context ...|","metadata":{"name":"example-task-name"},"spec":[{"default":"/workspace/workspace/Dockerfile","desc|...

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 verb push and registry argument, it might be more appropriate and clear to end users if we use a new cmd tkn 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 😆 )

@williamlfish williamlfish added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 2, 2022
@pradeepitm12 pradeepitm12 added this to the 0.27.0 milestone Sep 6, 2022
@piyush-garg piyush-garg modified the milestones: 0.27.0, 0.29.0 Nov 23, 2022
@piyush-garg piyush-garg modified the milestones: 0.29.0, 0.30.0 Jan 5, 2023
@piyush-garg piyush-garg modified the milestones: 0.30.0, 0.31.0, 0.32.0 Mar 28, 2023
@tekton-robot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 26, 2023
@vdemeester
Copy link
Member

/remove-lifecycle stale

@tekton-robot tekton-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 13, 2023
@piyush-garg piyush-garg modified the milestones: 0.32.0, 0.33.0 Aug 29, 2023
@piyush-garg piyush-garg modified the milestones: 0.33.0, 0.34.0 Nov 21, 2023
@vinamra28 vinamra28 modified the milestones: 0.34.0, v0.35.0 Jan 9, 2024
@piyush-garg piyush-garg modified the milestones: 0.35.0, 0.36.0 Feb 8, 2024
@piyush-garg piyush-garg modified the milestones: 0.36.0, 0.37.0, 0.38.0 May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
Status: Todo
Development

No branches or pull requests

6 participants