pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

Allow task to be cancelled if a parallel task fails

Open clearnicki opened this issue 1 year ago • 5 comments

Feature request

For instances in pipelines where there are 2 parallel tasks executing and if either of them fails, I'm requesting for an option to be able to have the other task be cancelled and continue directly to the Finally section. If something like this could be included in the pipeline definition and not require manual patching.

An example would be the "fail-fast" options from github workflow.

Use case

A use case would be if you have 2 parallel tasks that are checking the status of a merge request to promote code, if one of those tasks fails then the other in-progress one will be cancelled and proceed directly to the finally section

clearnicki avatar Apr 12 '24 14:04 clearnicki

+1

looks good to have this feature, currently can stop parallel tasks manually, but it would be better to add a feature switch to stop them automatically. @tektoncd/core-maintainers what do you think? If possible, I would like to submit a Tep and implement this.

chengjoey avatar May 08 '24 13:05 chengjoey

I think it makes sense indeed. Having a "fail-fast" like behavior would be nice indeed.

vdemeester avatar May 21 '24 12:05 vdemeester

/assign

chengjoey avatar May 21 '24 14:05 chengjoey