From f48717ccf03bbcd7b68639a6fdc7515a6d468e3a Mon Sep 17 00:00:00 2001 From: Paolo Quadri Date: Wed, 1 Feb 2023 17:25:25 +0100 Subject: [PATCH] Fixes #10003: retries force exit handlers (#10159) Signed-off-by: pquadri Co-authored-by: Saravanan Balasubramanian <33908564+sarabala1979@users.noreply.github.com> --- workflow/util/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 != "" {