argoproj / argoproj/argo-workflows

Proposal: failureStrategy for DAGs and expandable tempaltes

Open
#5,398 1 comment 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/controller area/spec area/templates/dag
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 20h
Merged PRs (30d)
138

Description

# Summary

Support more advanced strategies for when failing from a DAG or Steps template.

# Use Cases

Currently a DAG has `failFast`, and [recently](https://github.com/argoproj/argo-workflows/issues/3644#issuecomment-799033153) templates also support `failFast` in conjunction with `parallelism` and `with{Items,Prams}`, etc. However, this could be extended further.

Something like:
```yaml
failureStrategy:
when: "{{numberFailed}} > 2 || {{numberSkipped}} > 0"
terminateRunningPods: true # or `false` to allow them to complete
```

---

**Message from the maintainers**:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing DAG and Steps-template handling for failFast, parallelism, and withItems/withParams. Compare those behaviors with the proposed failureStrategy conditions and terminateRunningPods option; done means the strategy is defined consistently for both DAGs and expandable templates.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
cloud, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.