Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
Signed-off-by: shuangkun <tsk2013uestc@163.com>
  • Loading branch information
shuangkun committed Apr 12, 2024
1 parent 3b5265c commit f0ddd52
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions workflow/controller/retry_tweak.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@ type RetryTweak = func(retryStrategy wfv1.RetryStrategy, nodes wfv1.Nodes, pod *
// FindRetryNode locates the closes retry node ancestor to nodeID
func FindRetryNode(nodes wfv1.Nodes, nodeID string) *wfv1.NodeStatus {
boundaryID := nodes[nodeID].BoundaryID
if boundaryID == "" {
for _, node := range nodes {
if node.Type == wfv1.NodeTypeRetry && node.HasChild(nodeID) {
return &node
}
}
}
boundaryNode := nodes[boundaryID]
templateName := boundaryNode.TemplateName
for _, node := range nodes {
if boundaryID == "" && node.Type == wfv1.NodeTypeRetry && node.HasChild(nodeID) {
return &node
}
if node.Type == wfv1.NodeTypeRetry && node.TemplateName == templateName {
return &node
}
Expand Down

0 comments on commit f0ddd52

Please sign in to comment.