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:
Rebeccah 2020-01-13 13:53:07 -05:00
parent 2d3172f648
commit 70cf4cf5d4

View File

@ -219,13 +219,14 @@ class WorkflowDAG(SimpleDAG):
if self._should_mark_node_dnr(node, parent_nodes):
obj.do_not_run = True
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 the current node is a convergence node and all the
# 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)]
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
nodes_marked_do_not_run.append(node)