Skip to content

Commit

Permalink
fix: Fixed workflow onexit condition skipped when retry. Fixes #11884 (
Browse files Browse the repository at this point in the history
…#12019)

Signed-off-by: shmruin <meme_hm@naver.com>
  • Loading branch information
shmruin authored and terrytangyuan committed Oct 19, 2023
1 parent 61f00ba commit fe88053
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workflow/util/util.go
Expand Up @@ -906,7 +906,7 @@ func FormulateRetryWorkflow(ctx context.Context, wf *wfv1.Workflow, restartSucce
}
}
} else {
if node.Type == wfv1.NodeTypePod || node.Type == wfv1.NodeTypeSuspend {
if node.Type == wfv1.NodeTypePod || node.Type == wfv1.NodeTypeSuspend || node.Type == wfv1.NodeTypeSkipped {
newWF, resetParentGroupNodes = resetConnectedParentGroupNodes(wf, newWF, node, resetParentGroupNodes)
// Only remove the descendants of a suspended node but not the suspended node itself. The descendants
// of a suspended node need to be removed since the conditions should be re-evaluated based on
Expand All @@ -932,7 +932,7 @@ func FormulateRetryWorkflow(ctx context.Context, wf *wfv1.Workflow, restartSucce
}
}
} else {
log.Debugf("Reset non-pod/suspend node %s", node.Name)
log.Debugf("Reset non-pod/suspend/skipped node %s", node.Name)
newNode := node.DeepCopy()
newWF.Status.Nodes.Set(newNode.ID, resetNode(*newNode))
}
Expand Down

0 comments on commit fe88053

Please sign in to comment.