-
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
Enum validation failed when Task Param referenced multiple Pipeline Params #7476
Comments
When a pipelineTask The root question is that: when a pipelineTask e.g.
This is actually a scenario we didn't discuss explicitly when deciding adding enum subset enforcement. I think in such scenario, we cannot the /cc @jerop |
Fixes [tektoncd#7476][7476]. TEP-0144 requires that the pipeline-level `enum` must be a subset of referenced task-level `enum`. Prior to this commit, the enum subset validation logic assumes that a task-level param only referenced only one pipeline-level `enum`, and does not support scenario where multiple pipeline-level `enums` are referenced (e.g., "$(params.p1) and $(params.p2)"). This commit adds the handling logic for such compound references, skipping the subset validation in this scenario as there is no directly associated params at pipeline level. /kind bug [7476]: tektoncd#7476
Synced offline with @jerop. We should not do a subset validation in this scenario since there is no direct |
Fixes [#7476][7476]. TEP-0144 requires that the pipeline-level `enum` must be a subset of referenced task-level `enum`. Prior to this commit, the enum subset validation logic assumes that a task-level param only referenced only one pipeline-level `enum`, and does not support scenario where multiple pipeline-level `enums` are referenced (e.g., "$(params.p1) and $(params.p2)"). This commit adds the handling logic for such compound references, skipping the subset validation in this scenario as there is no directly associated params at pipeline level. /kind bug [7476]: #7476
Reported in #7270 (comment)
Expected Behavior
Tekton should pass
enum
validation when a pipelineTasks-levelparam
references multiple pipeline-levelparams
:Actual Behavior
enum
validation failed due tounexpected resolved param in ExtractVariablesFromString, expect 1 but got 2
Steps to Reproduce the Problem
enable-param-enum: true
Additional Info
v0.54
The text was updated successfully, but these errors were encountered: