-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
YAML Parser tests accept arbitrary fields #5318
Comments
Tekton Pipelines resources have no schema so they just accept arbitrary data happily
If you make a task with random nonsense it'd successfully be created but then every time you make a pod it will be rejected for the invalid nonsense field |
related discussion in #297 there's a downside that @jonjohnsonjr pointed out:
this was before I joined tekton, but I believe |
I don't know if this is true - we have a validation webhook that should fail this validation though I think that's a different issue from our test yaml parser allowing arbitrary fields |
Tekton already has upgrade schema migrations, is it not possible to have downgrade schema migrations? Also if there is a breaking difference across schemas I dont think it should be as easy as change the version and apply it because they're different. And if its at the cost of not getting any validation feedback for mistakes thats pretty painful |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
@lbernick is it ok to close this issue now? |
Thanks for checking @afrittoli, I think my main concern is that it's possible to define invalid yaml in reconciler tests without being alerted by a test failure. We don't have to change the /remove-lifecycle rotten |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Expected Behavior
Test inputs representing TaskRuns, PipelineRuns, etc, should not contain fields that aren't part of the spec of those objects.
Actual Behavior
The following test passes:
We use the yaml parser extensively in pipelinerun_test.go and taskrun_test.go
The text was updated successfully, but these errors were encountered: