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

Embed pipeline in pipelinerun on start #726

Closed
siamaksade opened this issue Feb 13, 2020 · 5 comments
Closed

Embed pipeline in pipelinerun on start #726

siamaksade opened this issue Feb 13, 2020 · 5 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@siamaksade
Copy link

When a pipelinerun references a pipeline and the pipeline definition changes after pipelinerun execution, it's impossible to know how the pipeline looked like at the time when pipelinerun was started. Specially when the pipelinerun fails.

Embedding the pipeline via pipelineSpec in the pipelnerun when starting pipelines via tkn p start would eliminate this problem and shows the exact pipeline definition at the exact time when the pipeline run was executed.

This behavior could be the default behaviour but allow for a user to enforce referencing a pipeline via a flag e.g. -force-pipeline-ref, if there is a use-case for it.

@chmouel
Copy link
Member

chmouel commented Feb 13, 2020

/kind feature

I think it would be good to talk about it at the tuesday meeting..

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 13, 2020
@danielhelfand
Copy link
Member

This sounds very similar to what exists for TaskRuns, but its use case is for a different purpose. There is a -f flag that lets a user start a Task that does not exist in a namespace. This is accomplished by parsing a local or remote file where a Task is defined and adding it to the TaskRun's TaskSpec as shown here.

@vdemeester
Copy link
Member

I am 👍 on this. As @sthaha asked during the WG, maybe we could even embedded the TaskSpec in the Pipeline (that is set in the pipelineSpec of the PipelineRun 👀) in order to have a full spec that do not reference anything external.

  • By default use pipelineSpec, have a flag to use pipelineRef instead
  • By default use taskSpec in the PipelineSpec, if the user decided to use pipelineRef, keep the PipelineSpec as is
  • Make sure even if we use pipelineSpec we know which Pipeline it originated from (aka setting the correct label/annotation)

@siamaksade what do you think ?

@siamaksade
Copy link
Author

That is very useful. Would make PipelineRun a complete immutable snaptshot of both pipeline and tasks at the time that it was created.

@vdemeester
Copy link
Member

I think this can be closed because of tektoncd/pipeline#2489 and tektoncd/pipeline#2444.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

5 participants