-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Expected Behavior
Once a PipelineRun starts, it does continue to the end (if success) no matter what happens to the referenced Pipeline (a change, …).
Actual Behavior
If something happens to the Pipeline that is referred by the PipelineRun, the controller might fail the execution because incompatibilities, missing resource/parameter/… or even missing Pipeline (or Task).
Steps to Reproduce the Problem
- Create a
PipelineRunreferencing aPipelinewith severalTask(that take enough time for you to mutate thePipeline) - Update the
Pipelinewith an additionnal param and an additonalTaskthat uses that param - See it fail on that new
Taskbecause of missing param
An even easier case to reproduce is
- Create a
PipelineRunreferencing aPipelinewith severalTask(that take enough time for you to mutate thePipeline) - Delete the Pipeline
- See the
PipelineRunfail withCouldntGetPipelineerror
I suspect the problem to be true even when using Tekton Bundle, if the tag changed between 2 reconcile, we may fetch the definition again (which is a performance problem, but this is kinda tracked in #3305.
Additional Info
- Kubernetes version:
Any
- Tekton Pipeline version:
Any
Possible solution
We are dereferencing the definitions in the status part of PipelineRun (and TaskRun). This could be used as the "source-of-truth" after the first reconciling "loop" and we wouldn't fetch the Pipeline definition anymore.
This means:
- Making sure we do dereference definition from Tekton Bundles
- Change the behavior of fetching
Pipelinedefinition to see if it's available in thestatus. If not, fetch thePipelinedefinition, if not, use the definition in thestatusas the source of truth.
/assign