Skip to content

Commit

Permalink
fix: add comment and trivial mistake
Browse files Browse the repository at this point in the history
Signed-off-by: toyamagu-2021 <toyamagu2021@gmail.com>
  • Loading branch information
toyamagu-2021 committed Sep 30, 2023
1 parent cacf70b commit 2863319
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1729,12 +1729,14 @@ func getChildNodeIndex(node *wfv1.NodeStatus, nodes wfv1.Nodes, index int) *wfv1
return &lastChildNode
}

// Get child node IDs of retry node by nodeName.
// We can't distinguish straightforwardly between retried nodes from other nodes because both have same node type.
func getChildNodeIdsRetried(node *wfv1.NodeStatus, nodes wfv1.Nodes) []string {
childrenIds := []string{}
r := regexp.MustCompile(`^` + regexp.QuoteMeta(node.Name) + `\(\d+\)`)
for i := 0; i < len(node.Children); i++ {
n := getChildNodeIndex(node, nodes, i)
if node == nil {
if n == nil {
continue
}
if r.MatchString(n.Name) {
Expand Down

0 comments on commit 2863319

Please sign in to comment.