-
Bug
-
Resolution: Done
-
Major
-
Pipelines 1.17.0
-
False
-
-
False
-
-
Description of problem: Facing "invalid result reference in pipeline task" trying to execute a PR with matrix and result.
~~~
invalid result reference in pipeline task "print-matrix": unable to validate result referencing pipeline task "test-matrix": task spec not found
~~~
Workaround -: NA
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
1) Execute below example PR to reproduce the issue
~~~
apiVersion: tekton.dev/v1 kind: PipelineRun metadata: generateName: matrix-result- spec: params: - name: games value: - cricket - football - name: players value: - messi - sachin pipelineSpec: tasks: - name: create-result1-test taskSpec: results: - name: game-array type: array steps: - image: registry.redhat.io/ubi9/ubi:9.5-1736404036 script: | echo -n "[\"cricket\", \"football\"]" | tee $(results.game-array.path) - name: create-result2-test taskSpec: results: - name: player-array type: array steps: - image: registry.redhat.io/ubi9/ubi:9.5-1736404036 script: | echo -n "[\"messi\", \"sachin\"]" | tee $(results.player-array.path) - name: test-matrix matrix: params: - name: game #value: $(params.games) # This works value: $(tasks.create-result1-test.results.game-array[*]) # This does not work - name: player #value: $(params.players) # This works value: $(tasks.create-result2-test.results.player-array[*]) # This does not work taskSpec: params: - name: game - name: player results: - name: message steps: - image: registry.redhat.io/ubi9/ubi:9.5-1736404036 script: | echo -n "$(params.game) council with player $(params.player)" | tee $(results.message.path) - name: print-matrix runAfter: ['test-matrix'] taskSpec: params: - name: messages type: array steps: - image: registry.redhat.io/ubi9/ubi:9.5-1736404036 script: | echo "testing" params: - name: messages value: $(tasks.test-matrix.results.message[*]) ~~~
But if I use "$(params.games)" instead of "$(tasks.create-result2-test.results.game-array[*])" it works.