-
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
v0.17.0 Pipeline can't be Run; it has an invalid spec: missing field(s): tasks[1].when[0] #3382
Comments
@jerop please help troubleshoot |
@pritidesai after some more tests it turned out that this issue manifests itself in scenario like this:
So I needed to reapply all my pipelines definitions in order to make them work. |
oh 😞, so pipelines deployed in Tekton |
I've prepared yaml definitions based on https://github.com/tektoncd/pipeline/blob/master/examples/v1beta1/pipelineruns/pipelinerun-with-when-expressions.yaml (separate Pipeline and PipelineRun) to be able to reproduce this issue:
|
How did the type representing when change ? |
@vdemeester the only change in the type between v0.16.3 and v0.17.0 was adding json annotations in #3291 |
Side note that there is some overlap with this issue and tektoncd/triggers#526 - in both cases we are getting some unexpected (and sometimes inconsistent) tolerance of using different casing for fields than what kubernetes is actually storing. (i.e. since before the change in #3291 k8s was storing the fields starting with uppercase letters, it's kind of confusing that users can still specify them in lower case - if that hadn't been the case we would have noticed this problem right away) |
Was brainstorming with @jerop yesterday how we could have avoided this and there didn't seem to be a lot of good options - thinking about it more, I think it would be good to tackle tektoncd/triggers#526 as well and understand more about why we are being tolerant of the capitalization mismatches and try to tackle that - imo that is the root cause of the problem here. |
The "short" team fix, aside from reverting the change, would be to have |
More brainstorming for options to help catch this in future:
|
When a pipeline with when expressions is created in v0.16.* then it is run in a pipelinerun in v0.17.0 or v0.17.1, a pipeline validation error about missing fields would be thrown -- as reported in tektoncd#3382 That happened because json annotations were added to when expressions type in v0.17.0 so that the fields would have lowercase, such as in the code completion in tekton intellij plugin as described in redhat-developer/intellij-tekton#223 Without the json annotations, the fields were stored with first letters capitalized, that is Input, Operator and Values. With the json annotations, the fields were expected to be lowercase, that is input, operator and values, causing the missing fields error in pipeline validation As such, users would have to reapply pipelines definitions created in previous versions to make them work in v0.17.0 or v0.17.1 -- to remove this requirement, we need to support both the uppercase and lowercase first letters for the annotations Fixes tektoncd#3382
When a pipeline with when expressions is created in v0.16.* then it is run in a pipelinerun in v0.17.0 or v0.17.1, a pipeline validation error about missing fields would be thrown -- as reported in tektoncd#3382 That happened because json annotations were added to when expressions type in v0.17.0 so that the fields would have lowercase, such as in the code completion in tekton intellij plugin as described in redhat-developer/intellij-tekton#223 Without the json annotations, the fields were stored with first letters capitalized, that is Input, Operator and Values. With the json annotations, the fields were expected to be lowercase, that is input, operator and values, causing the missing fields error in pipeline validation As such, users would have to reapply pipelines definitions created in previous versions to make them work in v0.17.0 or v0.17.1 -- to remove this requirement, we need to support both the uppercase and lowercase first letters for the annotations Fixes tektoncd#3382
When a pipeline with when expressions is created in v0.16.* then it is run in a pipelinerun in v0.17.0 or v0.17.1, a pipeline validation error about missing fields would be thrown -- as reported in tektoncd#3382 That happened because json annotations were added to when expressions type in v0.17.0 so that the fields would have lowercase, such as in the code completion in tekton intellij plugin as described in redhat-developer/intellij-tekton#223 Without the json annotations, the fields were stored with first letters capitalized, that is Input, Operator and Values. With the json annotations, the fields were expected to be lowercase, that is input, operator and values, causing the missing fields error in pipeline validation As such, users would have to reapply pipelines definitions created in previous versions to make them work in v0.17.0 or v0.17.1 -- to remove this requirement, we need to support both the uppercase and lowercase first letters for the annotations Fixes tektoncd#3382
When a pipeline with when expressions is created in v0.16.* then it is run in a pipelinerun in v0.17.0 or v0.17.1, a pipeline validation error about missing fields would be thrown -- as reported in tektoncd#3382 That happened because json annotations were added to when expressions type in v0.17.0 so that the fields would have lowercase, such as in the code completion in tekton intellij plugin as described in redhat-developer/intellij-tekton#223 Without the json annotations, the fields were stored with first letters capitalized, that is Input, Operator and Values. With the json annotations, the fields were expected to be lowercase, that is input, operator and values, causing the missing fields error in pipeline validation As such, users would have to reapply pipelines definitions created in previous versions to make them work in v0.17.0 or v0.17.1 -- to remove this requirement, we need to support both the uppercase and lowercase first letters for the annotations Fixes tektoncd#3382
When a pipeline with when expressions is created in v0.16.* then it is run in a pipelinerun in v0.17.0 or v0.17.1, a pipeline validation error about missing fields would be thrown -- as reported in #3382 That happened because json annotations were added to when expressions type in v0.17.0 so that the fields would have lowercase, such as in the code completion in tekton intellij plugin as described in redhat-developer/intellij-tekton#223 Without the json annotations, the fields were stored with first letters capitalized, that is Input, Operator and Values. With the json annotations, the fields were expected to be lowercase, that is input, operator and values, causing the missing fields error in pipeline validation As such, users would have to reapply pipelines definitions created in previous versions to make them work in v0.17.0 or v0.17.1 -- to remove this requirement, we need to support both the uppercase and lowercase first letters for the annotations Fixes #3382
When a pipeline with when expressions is created in v0.16.* then it is run in a pipelinerun in v0.17.0 or v0.17.1, a pipeline validation error about missing fields would be thrown -- as reported in tektoncd#3382 That happened because json annotations were added to when expressions type in v0.17.0 so that the fields would have lowercase, such as in the code completion in tekton intellij plugin as described in redhat-developer/intellij-tekton#223 Without the json annotations, the fields were stored with first letters capitalized, that is Input, Operator and Values. With the json annotations, the fields were expected to be lowercase, that is input, operator and values, causing the missing fields error in pipeline validation As such, users would have to reapply pipelines definitions created in previous versions to make them work in v0.17.0 or v0.17.1 -- to remove this requirement, we need to support both the uppercase and lowercase first letters for the annotations Fixes tektoncd#3382 (cherry picked from commit 4edcbc1) Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
When a pipeline with when expressions is created in v0.16.* then it is run in a pipelinerun in v0.17.0 or v0.17.1, a pipeline validation error about missing fields would be thrown -- as reported in #3382 That happened because json annotations were added to when expressions type in v0.17.0 so that the fields would have lowercase, such as in the code completion in tekton intellij plugin as described in redhat-developer/intellij-tekton#223 Without the json annotations, the fields were stored with first letters capitalized, that is Input, Operator and Values. With the json annotations, the fields were expected to be lowercase, that is input, operator and values, causing the missing fields error in pipeline validation As such, users would have to reapply pipelines definitions created in previous versions to make them work in v0.17.0 or v0.17.1 -- to remove this requirement, we need to support both the uppercase and lowercase first letters for the annotations Fixes #3382 (cherry picked from commit 4edcbc1) Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
Expected Behavior
Pipeline is executed.
Actual Behavior
PipelineValidationFailed:
It seems that "When" fields are empty.
Steps to Reproduce the Problem
PipelineRun definition:
Additional Info
In tekton pipelines 0.16 it works as expected.
The text was updated successfully, but these errors were encountered: