From ea29e66a41aee61d15f7dc526b8cb132e907e987 Mon Sep 17 00:00:00 2001 From: chris meyers Date: Thu, 18 Oct 2018 09:09:47 -0400 Subject: [PATCH] fix workflow finish state detector * Take into account the new do_not_run field when finding if a workflow is finished. If do_not_run is True then the node is considered finished. --- awx/main/scheduler/dag_workflow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/awx/main/scheduler/dag_workflow.py b/awx/main/scheduler/dag_workflow.py index e5c3243a58..a077c03eec 100644 --- a/awx/main/scheduler/dag_workflow.py +++ b/awx/main/scheduler/dag_workflow.py @@ -95,8 +95,10 @@ class WorkflowDAG(SimpleDAG): if obj.unified_job_template is None: is_failed = True continue - elif not job: + elif obj.do_not_run is False and not job: return False, False + elif obj.do_not_run is True: + continue children_success = self.get_dependencies(obj, 'success_nodes') children_failed = self.get_dependencies(obj, 'failure_nodes')