diff --git a/workflow/util/util.go b/workflow/util/util.go index d687cbf2c406..eef49def4fc7 100644 --- a/workflow/util/util.go +++ b/workflow/util/util.go @@ -856,7 +856,7 @@ func FormulateRetryWorkflow(ctx context.Context, wf *wfv1.Workflow, restartSucce } switch node.Phase { case wfv1.NodeSucceeded, wfv1.NodeSkipped: - if strings.HasSuffix(node.Name, onExitNodeName) || doForceResetNode { + if strings.HasPrefix(node.Name, onExitNodeName) || doForceResetNode { log.Debugf("Force reset for node: %s", node.Name) // Reset parent node if this node is a step/task group or DAG. if isGroupNode(node) && node.BoundaryID != "" {