From a642d98f8d017291849a4de6fd4b4f9da0a96ad2 Mon Sep 17 00:00:00 2001 From: xianlubird Date: Mon, 1 Jul 2019 10:47:43 +0800 Subject: [PATCH] Add doc about failFast feature --- examples/README.md | 2 ++ examples/dag-disable-failFast.yaml | 49 ++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 examples/dag-disable-failFast.yaml diff --git a/examples/README.md b/examples/README.md index bd1211a6d7b3..7df2f53b4ec2 100644 --- a/examples/README.md +++ b/examples/README.md @@ -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:** diff --git a/examples/dag-disable-failFast.yaml b/examples/dag-disable-failFast.yaml new file mode 100644 index 000000000000..683c990a1939 --- /dev/null +++ b/examples/dag-disable-failFast.yaml @@ -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 \ No newline at end of file