Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-7857

No event emitted when a PipelineRun task fails due to referencing uninitialized result

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      The Tekton documentation states that when a TaskRun references a result from a previous TaskRun, but the previous TaskRun fails to initialize the result, the PipelineRun will fail with a message like "InvalidTaskResultReference" : 

      unable to find result referenced by param 'foo' in 'task';: Could not find result with name 'commit' for task run 'checkout-source'

      The actual behavior is the PipelineRun fails with the reason PipelineValidationFailed and no other context. The controller logs emit an info log like "Failed to resolve task result reference for "deployment-validation-operator-fbc-on-pull-request-mlgxw" with error Invalid task result reference: Could not find result with name RENDERED_CATALOG_DIGEST for task validate-fbc", but no event is emitted on the PipelineRun, and the PipelineRun's status does not mention which Task failed validation or what about the Validation failed.

      Reproduction Steps:

      1. Have a kind or Openshift cluster running Tekton or Openshift Pipelines
      2. In the tektoncd/pipeline repository, modify examples/v1/pipelinejruns/task_results_example.yaml: modify the Multiply Task so that it does not write to the product result by deleting `| tee $(results.product.path)` from line 91
      3. Create the pipelinerun with kubectl create -f ./examples/v1/pipelineruns/task_results_example.yaml
      4. Observe the failure mode.

              Unassigned Unassigned
              rh-ee-athorp Andrew Thorp
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: