diff --git a/examples/01-tasks/notebook.yaml b/examples/01-tasks/notebook.yaml index f1826210..d0c48965 100644 --- a/examples/01-tasks/notebook.yaml +++ b/examples/01-tasks/notebook.yaml @@ -29,7 +29,3 @@ dag: command_type: notebook command: examples/common/simple_notebook.ipynb # The path is relative to the root of the project. next: success - success: - type: success - fail: - type: fail diff --git a/examples/01-tasks/python_tasks.yaml b/examples/01-tasks/python_tasks.yaml index 0bc4550d..c5e5d6d4 100644 --- a/examples/01-tasks/python_tasks.yaml +++ b/examples/01-tasks/python_tasks.yaml @@ -21,7 +21,3 @@ dag: type: task command: examples.common.functions.hello # dotted path to the function. next: success - success: - type: success - fail: - type: fail diff --git a/examples/01-tasks/scripts.yaml b/examples/01-tasks/scripts.yaml index 318c7be5..1f04b1c4 100644 --- a/examples/01-tasks/scripts.yaml +++ b/examples/01-tasks/scripts.yaml @@ -18,7 +18,3 @@ dag: command_type: shell command: echo "hello world!!" # The path is relative to the root of the project. next: success - success: - type: success - fail: - type: fail diff --git a/examples/01-tasks/stub.yaml b/examples/01-tasks/stub.yaml index 5e9afead..f7001cb3 100644 --- a/examples/01-tasks/stub.yaml +++ b/examples/01-tasks/stub.yaml @@ -27,7 +27,3 @@ dag: step 3: type: stub next: success - success: - type: success - fail: - type: fail diff --git a/examples/02-sequential/default_fail.yaml b/examples/02-sequential/default_fail.yaml index 4802ccb3..ec7fe156 100644 --- a/examples/02-sequential/default_fail.yaml +++ b/examples/02-sequential/default_fail.yaml @@ -21,7 +21,3 @@ dag: step 3: type: stub # This will never execute next: success - success: - type: success - fail: - type: fail diff --git a/examples/02-sequential/on_failure_fail.yaml b/examples/02-sequential/on_failure_fail.yaml index 0521038e..2159b6c1 100644 --- a/examples/02-sequential/on_failure_fail.yaml +++ b/examples/02-sequential/on_failure_fail.yaml @@ -32,7 +32,3 @@ dag: step_4: type: stub next: fail - success: - type: success - fail: - type: fail diff --git a/examples/02-sequential/on_failure_succeed.yaml b/examples/02-sequential/on_failure_succeed.yaml index 50c7c4b6..27a19b58 100644 --- a/examples/02-sequential/on_failure_succeed.yaml +++ b/examples/02-sequential/on_failure_succeed.yaml @@ -32,7 +32,3 @@ dag: step_4: type: stub next: success - success: - type: success - fail: - type: fail diff --git a/examples/02-sequential/traversal.yaml b/examples/02-sequential/traversal.yaml index 44ab0b5f..1b0413b3 100644 --- a/examples/02-sequential/traversal.yaml +++ b/examples/02-sequential/traversal.yaml @@ -43,8 +43,4 @@ dag: type: task command_type: notebook command: examples/common/simple_notebook.ipynb # The path is relative to the root of the project. - next: success - success: # (3) - type: success - fail: - type: fail + next: success # (3) diff --git a/examples/03-parameters/passing_parameters_notebook.yaml b/examples/03-parameters/passing_parameters_notebook.yaml index 8beb58fc..aa56d28f 100644 --- a/examples/03-parameters/passing_parameters_notebook.yaml +++ b/examples/03-parameters/passing_parameters_notebook.yaml @@ -36,7 +36,3 @@ dag: command_type: notebook command: examples/common/read_parameters.ipynb next: success - success: - type: success - fail: - type: fail diff --git a/examples/03-parameters/passing_parameters_python.yaml b/examples/03-parameters/passing_parameters_python.yaml index f33a8302..1919e786 100644 --- a/examples/03-parameters/passing_parameters_python.yaml +++ b/examples/03-parameters/passing_parameters_python.yaml @@ -36,7 +36,3 @@ dag: type: task command: examples.common.functions.read_parameter next: success - success: - type: success - fail: - type: fail diff --git a/examples/03-parameters/passing_parameters_shell.yaml b/examples/03-parameters/passing_parameters_shell.yaml index b12e48d0..51977425 100644 --- a/examples/03-parameters/passing_parameters_shell.yaml +++ b/examples/03-parameters/passing_parameters_shell.yaml @@ -49,7 +49,3 @@ dag: exit 1; fi next: success - success: - type: success - fail: - type: fail diff --git a/examples/03-parameters/static_parameters_non_python.yaml b/examples/03-parameters/static_parameters_non_python.yaml index cf7809d5..35f4d0d9 100644 --- a/examples/03-parameters/static_parameters_non_python.yaml +++ b/examples/03-parameters/static_parameters_non_python.yaml @@ -44,7 +44,3 @@ dag: exit 1; fi next: success - success: - type: success - fail: - type: fail diff --git a/examples/03-parameters/static_parameters_python.yaml b/examples/03-parameters/static_parameters_python.yaml index f86302d7..8448cc1f 100644 --- a/examples/03-parameters/static_parameters_python.yaml +++ b/examples/03-parameters/static_parameters_python.yaml @@ -31,7 +31,3 @@ dag: type: task command: examples.common.functions.read_initial_params_as_json next: success - success: - type: success - fail: - type: fail diff --git a/examples/04-catalog/catalog.yaml b/examples/04-catalog/catalog.yaml index 64d90e24..07d8abcf 100644 --- a/examples/04-catalog/catalog.yaml +++ b/examples/04-catalog/catalog.yaml @@ -113,7 +113,3 @@ dag: rm df.csv || true && \ rm data_folder/data.txt || true next: success - success: - type: success - fail: - type: fail diff --git a/examples/06-parallel/nesting.yaml b/examples/06-parallel/nesting.yaml index 32b189f3..7e202ad0 100644 --- a/examples/06-parallel/nesting.yaml +++ b/examples/06-parallel/nesting.yaml @@ -24,10 +24,6 @@ branch: &simple_branch command_type: notebook command: examples/common/simple_notebook.ipynb # The path is relative to the root of the project. next: success - success: - type: success - fail: - type: fail # This branch is similar to a branch parallel.yaml @@ -40,10 +36,6 @@ nested_branch: &nested_branch branches: branch1: *simple_branch branch2: *simple_branch - success: - type: success - failure: - type: fail # The pipeline of nested parallel branches @@ -56,7 +48,3 @@ dag: branches: branch1: *nested_branch branch2: *nested_branch - success: - type: success - failure: - type: fail diff --git a/examples/06-parallel/parallel.yaml b/examples/06-parallel/parallel.yaml index c76d7502..a4675ce2 100644 --- a/examples/06-parallel/parallel.yaml +++ b/examples/06-parallel/parallel.yaml @@ -23,10 +23,6 @@ branch: &branch command_type: notebook command: examples/common/simple_notebook.ipynb # The path is relative to the root of the project. next: success - success: - type: success - fail: - type: fail dag: @@ -47,7 +43,3 @@ dag: branches: branch1: *branch branch2: *branch - success: - type: success - failure: - type: fail diff --git a/examples/07-map/custom_reducer.yaml b/examples/07-map/custom_reducer.yaml index 3189924e..e88b14b6 100644 --- a/examples/07-map/custom_reducer.yaml +++ b/examples/07-map/custom_reducer.yaml @@ -33,10 +33,6 @@ branch: &branch type: task command: examples.common.functions.read_processed_chunk next: success - success: - type: success - fail: - type: fail dag: description: | @@ -75,7 +71,3 @@ dag: type: task command: examples.common.functions.assert_custom_reducer next: success - success: - type: success - fail: - type: fail diff --git a/examples/07-map/map.yaml b/examples/07-map/map.yaml index d61828cd..0c8c0b7f 100644 --- a/examples/07-map/map.yaml +++ b/examples/07-map/map.yaml @@ -33,10 +33,6 @@ branch: &branch type: task command: examples.common.functions.read_processed_chunk next: success - success: - type: success - fail: - type: fail dag: @@ -76,7 +72,3 @@ dag: type: task command: examples.common.functions.assert_default_reducer next: success - success: - type: success - fail: - type: fail diff --git a/examples/09-retry/python_tasks.yaml b/examples/09-retry/python_tasks.yaml index f86302d7..8448cc1f 100644 --- a/examples/09-retry/python_tasks.yaml +++ b/examples/09-retry/python_tasks.yaml @@ -31,7 +31,3 @@ dag: type: task command: examples.common.functions.read_initial_params_as_json next: success - success: - type: success - fail: - type: fail diff --git a/runnable/graph.py b/runnable/graph.py index e66de8e6..c7cb4284 100644 --- a/runnable/graph.py +++ b/runnable/graph.py @@ -342,6 +342,8 @@ def create_graph(dag_config: Dict[str, Any], internal_branch_name: str = "") -> node = create_node(name, step_config=step_config, internal_branch_name=internal_branch_name) graph.add_node(node) + graph.add_terminal_nodes(internal_branch_name=internal_branch_name) + graph.check_graph() return graph