-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add code completion for when clause #223
Conversation
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the source code, the values for Operator are the following:
!
=
==
in
!=
notin
exists
gt
lt
But the doc mentions only in
and notin
.
So asking @jerop for confirmation
@jeffmaury even though If another We could consider supporting other |
@lstocchi please note that |
Yes that a side effect because our JSON schema generator is parsing the Go code and I noticed that the |
I didn't pay much attention on this aspect before but now that @jerop pointed that out i guess we need to fix it. If someone copy/paste an example from the tekton repo (which contains the lowercase names), she/he will get a warning in our plugin. Not good. |
@jeffmaury added the annotations in tektoncd/pipeline#3291 excited to see code completion for when expressions supported in the plugin! |
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@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 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>
it resolves #209
@jeffmaury this patch was born to add code completion for when clause but it is starting going too far so i prefer to stop here and complete the initial work in further PRs.
This patch contains two things essentially.
in
,notin
operator optionsOnce this will be merged i will extend the usage of the vfs to everything else and add tests for the vfs.
An example of how it works below: