From f69655a09c82236d91703fbce2ee1a07fc3641be Mon Sep 17 00:00:00 2001 From: Saravanan Balasubramanian <33908564+sarabala1979@users.noreply.github.com> Date: Tue, 14 Jan 2020 10:34:04 -0800 Subject: [PATCH] fix: Added decompress in retry, resubmit and resume. (#1934) --- cmd/argo/commands/retry.go | 6 ++++++ workflow/util/util.go | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/cmd/argo/commands/retry.go b/cmd/argo/commands/retry.go index 95434b7de0a7..513a3df0998d 100644 --- a/cmd/argo/commands/retry.go +++ b/cmd/argo/commands/retry.go @@ -28,6 +28,12 @@ func NewRetryCommand() *cobra.Command { if err != nil { log.Fatal(err) } + + err = util.DecompressWorkflow(wf) + if err != nil { + log.Fatal(err) + } + wf, err = util.RetryWorkflow(kubeClient, wfClient, wf) if err != nil { log.Fatal(err) diff --git a/workflow/util/util.go b/workflow/util/util.go index 134b6dfe99fc..9c088616d817 100644 --- a/workflow/util/util.go +++ b/workflow/util/util.go @@ -335,6 +335,12 @@ func ResumeWorkflow(wfIf v1alpha1.WorkflowInterface, workflowName string) error if err != nil { return false, err } + + err = DecompressWorkflow(wf) + if err != nil { + log.Fatal(err) + } + updated := false if wf.Spec.Suspend != nil && *wf.Spec.Suspend { wf.Spec.Suspend = nil @@ -434,6 +440,10 @@ func FormulateResubmitWorkflow(wf *wfv1.Workflow, memoized bool) (*wfv1.Workflow replaceRegexp := regexp.MustCompile("^" + wf.ObjectMeta.Name) newWF.Status.Nodes = make(map[string]wfv1.NodeStatus) onExitNodeName := wf.ObjectMeta.Name + ".onExit" + err := DecompressWorkflow(wf) + if err != nil { + log.Fatal(err) + } for _, node := range wf.Status.Nodes { newNode := node.DeepCopy() if strings.HasPrefix(node.Name, onExitNodeName) {