Skip to content
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

invalid result reference when consuming results from dynamic matrix #7922

Open
t1bb4r opened this issue Apr 29, 2024 · 0 comments
Open

invalid result reference when consuming results from dynamic matrix #7922

t1bb4r opened this issue Apr 29, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@t1bb4r
Copy link

t1bb4r commented Apr 29, 2024

Expected Behavior

Expect validation to pass and tasks to run.

Actual Behavior

Reconciliation error is preventing the pipeline from executing.

Steps to Reproduce the Problem

  1. Create a pipeline with tasks that use a dynamic matrix
kubectl create -f - <<'EOF'
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  generateName: matrix-test-
spec:
  params:
  - name: users
    value:
    - john
    - pete
  pipelineSpec:
    tasks:
    - name: generate-array
      taskSpec:
        results:
        - name: some-array
          type: array
        steps:
        - image: bash
          script: |
            echo -n "[\"john\", \"pete\"]" | tee $(results.some-array.path)
    - name: dynamic-matrix
      matrix:
        params:
        - name: user
          #value: $(params.users) # This works
          value: $(tasks.generate-array.results.some-array[*]) # This does not work
      taskSpec:
        params:
        - name: user
        results:
        - name: email
        steps:
        - image: bash
          script: |
            echo -n "$(params.user)@example.com" | tee $(results.email.path)
    - name: echo-matrix # echo results
      runAfter: ['dynamic-matrix']
      taskSpec:
        params:
        - name: emails
          type: array
        steps:
        - image: bash
          script: |
            echo "testing"
      params:
      - name: emails
        value: $(tasks.dynamic-matrix.results.email[*])
EOF
  1. See error in tekton pipeline controller
{"severity":"error","timestamp":"2024-04-29T16:56:14.456Z","logger":"tekton-pipelines-controller","caller":"pipelinerun/pipelinerun.go:696","message":"Failed to resolve task result reference for \"matrix-test-9g
2bz\" with error invalid result reference in pipeline task \"echo-matrix\": unable to validate result referencing pipeline task \"dynamic-matrix\": task spec not found","commit":"34d8c0f"
...

Additional Info

  • Kubernetes version:

    Output of kubectl version:

Client Version: v1.28.4
Server Version: v1.28.3
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

v0.59.0
@t1bb4r t1bb4r added the kind/bug Categorizes issue or PR as related to a bug. label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

1 participant