Skip to content

Commit

Permalink
fix: Added decompress in retry, resubmit and resume. (#1934)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarabala1979 authored Jan 14, 2020
1 parent 1e7ccb5 commit f69655a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/argo/commands/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions workflow/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit f69655a

Please sign in to comment.