mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 15:58:45 -03:30
added in handling for a parent being DNR so status is only checked if the parent isn't a DNR parent (in which case the parent has no status, which was breaking the logic) also edited a comment and added in a DNR check that @alancoding suggested to cut out duplicates in the DAG list
This commit is contained in:
@@ -219,13 +219,14 @@ class WorkflowDAG(SimpleDAG):
|
|||||||
if self._should_mark_node_dnr(node, parent_nodes):
|
if self._should_mark_node_dnr(node, parent_nodes):
|
||||||
obj.do_not_run = True
|
obj.do_not_run = True
|
||||||
nodes_marked_do_not_run.append(node)
|
nodes_marked_do_not_run.append(node)
|
||||||
if obj.all_parents_must_converge:
|
if not obj.do_not_run and obj.all_parents_must_converge:
|
||||||
if self._are_relevant_parents_finished(node):
|
if self._are_relevant_parents_finished(node):
|
||||||
# if the current node is a convergence node and all the
|
# if the current node is a convergence node and all the
|
||||||
# parents are finished then check to see if all parents
|
# parents are finished then check to see if all parents
|
||||||
# met their success criteria to run the convergence child
|
# met the needed criteria to run the convergence child
|
||||||
|
# (i.e. parent must fail, parent must succeed)
|
||||||
parent_nodes = [p['node_object'] for p in self.get_parents(obj)]
|
parent_nodes = [p['node_object'] for p in self.get_parents(obj)]
|
||||||
if not all(obj in self.get_children(p, p.job.status) for p in parent_nodes):
|
if any(p.do_not_run for p in parent_nodes) or not all(obj in self.get_children(p, p.job.status)for p in parent_nodes):
|
||||||
obj.do_not_run = True
|
obj.do_not_run = True
|
||||||
nodes_marked_do_not_run.append(node)
|
nodes_marked_do_not_run.append(node)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user