Skip to content

Commit

Permalink
Add doc about failFast feature (#1453)
Browse files Browse the repository at this point in the history
  • Loading branch information
xianlubird authored and jessesuen committed Jul 10, 2019
1 parent 6a59030 commit 0a9cf9d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ spec:

The dependency graph may have [multiple roots](./dag-multiroot.yaml). The templates called from a DAG or steps template can themselves be DAG or steps templates. This can allow for complex workflows to be split into manageable pieces.

The DAG logic has a built-in `fail fast` feature to stop scheduling new steps, as soon as it detects that one of the DAG nodes is failed. Then it waits until all DAG nodes are completed before failing the DAG itself.
The [FailFast](./dag-disable-failFast.yaml) flag default is `true`, if set to `false`, it will allow a DAG to run all branches of the DAG to completion (either success or failure), regardless of the failed outcomes of branches in the DAG. More info and example about this feature at [here](https://github.com/argoproj/argo/issues/1442).
## Artifacts

**Note:**
Expand Down
49 changes: 49 additions & 0 deletions examples/dag-disable-failFast.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: dag-primay-branch-
spec:
entrypoint: statis
templates:
- name: a
container:
image: docker/whalesay:latest
command: [cowsay]
args: ["hello world"]
- name: b
retryStrategy:
limit: 2
container:
image: alpine:latest
command: [sh, -c]
args: ["sleep 30; echo haha"]
- name: c
retryStrategy:
limit: 3
container:
image: alpine:latest
command: [sh, -c]
args: ["echo intentional failure; exit 2"]
- name: d
container:
image: docker/whalesay:latest
command: [cowsay]
args: ["hello world"]
- name: statis
dag:
failFast: false
tasks:
- name: A
template: a
- name: B
dependencies: [A]
template: b
- name: C
dependencies: [A]
template: c
- name: D
dependencies: [B]
template: d
- name: E
dependencies: [D]
template: d

0 comments on commit 0a9cf9d

Please sign in to comment.