-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Milestone
Description
Expected Behavior
Embedding a Pipeline spec into a PipelineRun should not change the behaviour of results.
Actual Behavior
If you remove the runAfter clause from this example, you get an error caused by the controller mistakenly starting both Tasks simultaneously.
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: test-case
name: test-case-run
spec:
params:
- name: prefix
value: prefix
pipelineSpec:
params:
- name: prefix
tasks:
- name: generate-suffix
taskSpec:
results:
- name: suffix
steps:
- name: generate-suffix
image: alpine
script: |
echo -n "suffix" > $(results.suffix.path)
- name: do-something
taskSpec:
params:
- name: arg
steps:
- name: do-something
image: alpine
script: |
echo "$(params.arg)"
params:
- name: arg
# this should be enough to imply to the controller that this Task should run
# after generate-suffix, but with runAfter removed, the controller starts it at
# the same time as generate-suffix
value: "$(params.prefix):$(tasks.generate-suffix.results.suffix)"Steps to Reproduce the Problem
- Apply the above yaml and look at the pipelinerun
Additional Info
Interestingly this doesnt happen when not embedding the pipelinespec, e.g. this other example does not have the same problem https://github.com/tektoncd/pipeline/blob/master/examples/v1beta1/pipelineruns/pipelinerun-results.yaml
- Tekton Pipeline version: HEAD @ 1346656
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.