-
Bug
-
Resolution: Done
-
Critical
-
Pipelines 1.5.2
-
None
-
2
-
False
-
False
-
-
-
Pipelines Sprint 210, Pipelines Sprint 211, Pipelines Sprint 212, Pipelines Sprint 215
Expected behavior
Final tasks are always executed
Actual behavior
In a pipeline with two parallel tasks where both fail and one of them has "retries=2", final tasks are never executed. Pipeline fails later because of timeout.
Steps to reproduce
apiVersion: tekton.dev/v1beta1 kind: Task metadata: name: noop spec: params: - name: RETURN_CODE default: "0" steps: - name: sleep image: registry.access.redhat.com/ubi8/ubi-minimal script: | #!/usr/bin/env bash set -e echo "Will sleep for 2 seconds" sleep 2 if [[ $(params.RETURN_CODE) != "0" ]]; then echo "Failure" else echo "Success" fi exit $(params.RETURN_CODE)
apiVersion: tekton.dev/v1beta1 kind: Pipeline metadata: name: test-finally spec: tasks: - name: test1 taskRef: name: noop params: - name: RETURN_CODE value: "1" retries: 2 - name: test2 taskRef: name: noop params: - name: RETURN_CODE value: "1" # retries: 2 finally: - name: cleanup taskRef: name: noop
apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: generateName: test-finally- spec: pipelineRef: name: test-finally timeout: 2m
Additonal information
This pipeline works as expected when any of following changes
- task test2 succeeds
- both task1 and task2 have retries=2 (or any number)
- task test1 has retries=1, retries=0 or retries is omitted