Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Added decompress in retry, resubmit and resume. #1934

Merged
merged 3 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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