-
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
Beta features for inline Task and Pipeline not validated #7077
Comments
Also this might indicate that we need more unit tests for inline Task/Pipeline validations. |
Thanks for the super responsive fix! @lbernick |
This commit fixes the bug that inline Task and Pipeline in TaskRuns and PipelineRuns were not validated after v0.49.0 by moving the validations of Task and Pipeline to TaskSpec and PipelineSpec. More specifically, TaskSpec.Validate and PipelineSpec.Validate were called in reconciler while Task.Validate and Pipeline.Validate are not. fixes: tektoncd#7077
This commit fixes the bug that inline Task and Pipeline in TaskRuns and PipelineRuns were not validated after v0.49.0 by moving the validations of Task and Pipeline to TaskSpec and PipelineSpec. More specifically, TaskSpec.Validate and PipelineSpec.Validate were called in reconciler while Task.Validate and Pipeline.Validate are not. fixes: tektoncd#7077
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077.
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077.
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077.
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077.
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077.
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077.
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077. part of: tektoncd#7177 related: TEP0138 /kind misc
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077. part of: tektoncd#7177 related: TEP0138 /kind misc
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077. part of: tektoncd#7177 related: TEP0138 /kind misc
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077. part of: tektoncd#7177 related: TEP0138 /kind misc
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077. part of: tektoncd#7177 related: TEP0138 /kind misc
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077. part of: tektoncd#7177 related: TEP0138 /kind misc
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077. part of: tektoncd#7177 related: TEP0138 /kind misc
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077. part of: tektoncd#7177 related: TEP0138 /kind misc
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077. part of: tektoncd#7177 related: TEP0138 /kind misc
This commit moves the Task.Validate and Pipeline.Validate back to TaskSpec.Validate and PipelineSpec.Validate. This serves the same purpose of fixing tektoncd#7077. part of: tektoncd#7177 related: TEP0138 /kind misc
Expected Behavior
Beta features (taking params array indexing as an example here in this issue) shall requires
enable-api-fields=beta
to be enabled. However, this validation was changed from taskSpec.Validate to task.Validate via Validate beta features only when v1 Tasks and Pipelines are defined to avoid validation after conversion for the decoupling api and feature versioning.Thanks to the example and help from @Yongxuanzhang and pointer from @lbernick .
This issue is created to provided evidence that we do need to move the Validation from task.Validate to taskSpec.Validate(similarly for pipeline). The reason for this is that Task.Validate is not used in reconciler while
TaskSpec.Validate is called in reconciler. Prior to v0.49.x this does not exist.
It is likely that we need cherry-pick with the decoupling change back to v0.49. 🤔 Another way would be to have a workaround of adding Task.Validate/ Pipeline.Validate to the reconciler where inline Task and Pipeline are used that needs validation. This could depend on the preference of v0.50.x LTS users if they want to have decoupling changes which could be a breaking change.
related: TEP0138 #6592
Actual Behavior
Inline beta features for Task and Pipeline now pass validations without setting
enable-api-fields
=beta
.Steps to Reproduce the Problem
enable-api-fields=stable
enable-api-fields=stable
). While the following equivalent Task for the same TaskRun fails validation.Additional Info
Kubernetes version:
Output of
kubectl version
:Tekton Pipeline version:
Output of
tkn version
orkubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'
The text was updated successfully, but these errors were encountered: