tektoncd / pipeline

A cloud-native Pipeline resource.
https://tekton.dev
Apache License 2.0
8.5k stars 1.78k forks source link

Add analogy of fail fast to Pipeline definition to cancel in case of 1 failed task #6313

Open andrejusc opened 1 year ago

andrejusc commented 1 year ago

Feature request

Have within Pipeline's definition explicit field to say if whole pipeline should be cancelled in case of 1 task had failed.

Use case

Having multiple tasks running in parallel, where some could be short and some could be long in execution time, it would be beneficial to have ability to cancel whole pipeline if some short task failed already.

Looking at this documentation https://tekton.dev/docs/pipelines/pipelineruns/#gracefully-cancelling-a-pipelinerun - it seems to possible to achieve from outside by changing PipelineRun status. But here feature request is for PipelineRun to manage such cancel condition itself if specified upfront in Pipeline's definition.

chengjoey commented 1 year ago

Set a field in the pipelinerun to indicate that if one task fails, other parallel tasks should be cancelled directly. This seems meaningful because in cases where it is known that the pipelinerun will fail, resources can be released as soon as possible without having to manually cancel the entire pipelinerun from outside.

tekton-robot commented 1 year ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

andrejusc commented 1 year ago

/remove-lifecycle stale

I think such requires some effort to be earlier than later in place.

tekton-robot commented 1 year ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

jerop commented 1 year ago

/lifecycle frozen

/help-wanted