-
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
Unable to use array parameter substitution in pipeline #5149
Comments
/assign @Yongxuanzhang |
Hi @pietervincken, thanks for reporting this issue!
|
Maybe this can work for new created resources but not for existing resources? |
I used the exact same example as you did, but without the actual params in the pipelinerun. That results in the issue. If the additional-parameters isn't specified, it should default to []. I get the error |
Using
or
triggers the behavior |
Oh I see, thanks! Looks like something wrong with the default value type |
This is related to #4786 and also the following PR since we changed the behaviour of So when passing an empty array as param from Before that commit the |
Prior to this change, if there is only one element in an array that is a reference to an empty array, the original array becomes nil after replacement, but it should be an empty array instead of nil. Fixes tektoncd#5149
Hi @pietervincken , The reason of this bug is that if an array contains a single element that is a reference to an empty array, the original array would become With #5162 , your example should work now. |
/assign |
Prior to this change, if there is only one element in an array that is a reference to an empty array, the original array becomes nil after replacement, but it should be an empty array instead of nil. Fixes #5149
Prior to this change, if there is only one element in an array that is a reference to an empty array, the original array becomes nil after replacement, but it should be an empty array instead of nil. Fixes tektoncd#5149 Signed-off-by: Vincent Demeester <[email protected]>
Prior to this change, if there is only one element in an array that is a reference to an empty array, the original array becomes nil after replacement, but it should be an empty array instead of nil. Fixes #5149 Signed-off-by: Vincent Demeester <[email protected]>
Prior to this change, if there is only one element in an array that is a reference to an empty array, the original array becomes nil after replacement, but it should be an empty array instead of nil. Fixes tektoncd#5149
Prior to this change, if there is only one element in an array that is a reference to an empty array, the original array becomes nil after replacement, but it should be an empty array instead of nil. Fixes tektoncd#5149 Signed-off-by: Vincent Demeester <[email protected]>
Prior to this change, if there is only one element in an array that is a reference to an empty array, the original array becomes nil after replacement, but it should be an empty array instead of nil. Fixes tektoncd#5149 Signed-off-by: Vincent Demeester <[email protected]>
Prior to this change, if there is only one element in an array that is a reference to an empty array, the original array becomes nil after replacement, but it should be an empty array instead of nil. Fixes #5149 Signed-off-by: Vincent Demeester <[email protected]>
Expected Behavior
Array parameters can be used in order to pass lists to pipelines and tasks. Since v0.36.0 this behaviour seems broken and prevents the usage of array parameters in pipelines.
Actual Behavior
When using array parameter substitution the following error is thrown:
invalid input params for task task-name: param types don't match the user-specified type: [array-variable-name]
Steps to Reproduce the Problem
Additional Info
Kubernetes version:
Output of
kubectl version
:Pipeline version: v0.36.0 and v0.37.2 (confirmed on both)
Potentially related:
Pipeline example
Pipeline run
The text was updated successfully, but these errors were encountered: