From 0fc0991f537cad2496fc08d000811f6fbc4216c6 Mon Sep 17 00:00:00 2001 From: Cristian Pop Date: Fri, 8 Mar 2019 11:22:42 +0200 Subject: [PATCH] [Fix #1242] Failed DAG nodes are now kept and set to running on RetryWorkflow. --- workflow/util/util.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/workflow/util/util.go b/workflow/util/util.go index 156f32a365d8..a4b4852d0387 100644 --- a/workflow/util/util.go +++ b/workflow/util/util.go @@ -462,6 +462,14 @@ func RetryWorkflow(kubeClient kubernetes.Interface, wfClient v1alpha1.WorkflowIn continue } case wfv1.NodeError, wfv1.NodeFailed: + if !strings.HasPrefix(node.Name, onExitNodeName) && node.Type == wfv1.NodeTypeDAG { + newNode := node.DeepCopy() + newNode.Phase = wfv1.NodeRunning + newNode.Message = "" + newNode.FinishedAt = metav1.Time{} + newWF.Status.Nodes[newNode.ID] = *newNode + continue + } // do not add this status to the node. pretend as if this node never existed. default: // Do not allow retry of workflows with pods in Running/Pending phase