Skip to content

Commit

Permalink
fix: Consider all children of TaskGroups in DAGs (#3740)
Browse files Browse the repository at this point in the history
  • Loading branch information
simster7 authored and alexec committed Sep 2, 2020
1 parent 8ac7369 commit 56dc9f7
Show file tree
Hide file tree
Showing 2 changed files with 825 additions and 4 deletions.
5 changes: 1 addition & 4 deletions workflow/controller/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,9 @@ func (d *dagContext) assessDAGPhase(targetTasks []string, nodes wfv1.Nodes) wfv1
}
}

if node.Type == wfv1.NodeTypeRetry || node.Type == wfv1.NodeTypeTaskGroup {
if node.Type == wfv1.NodeTypeRetry {
// A fulfilled Retry node will always reflect the status of its last child node, so its individual attempts don't interest us.
// To resume the traversal, we look at the children of the last child node.
// A TaskGroup node will always reflect the status of its expanded tasks (mainly it will be Succeeded if and only if all of its
// expanded tasks have succeeded), so each individual expanded task doesn't interest us. To resume the traversal, we look at the
// children of its last child node (note that this is arbitrary, since all expanded tasks will have the same children).
if childNode := getChildNodeIndex(&node, nodes, -1); childNode != nil {
uniqueQueue.add(generatePhaseNodes(childNode.Children, branchPhase)...)
}
Expand Down
Loading

0 comments on commit 56dc9f7

Please sign in to comment.