Skip to content

Commit

Permalink
Delay killing sidecars until artifacts are saved (#1645)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddseapy authored and jessesuen committed Oct 4, 2019
1 parent ec5f986 commit 69fd8a5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions cmd/argoexec/commands/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,26 @@ func waitContainer() error {
wfExecutor.AddError(err)
// do not return here so we can still try to kill sidecars & save outputs
}
err = wfExecutor.KillSidecars()
if err != nil {
wfExecutor.AddError(err)
// do not return here so we can still try save outputs
}
// Saving logs
logArt, err := wfExecutor.SaveLogs()
if err != nil {
wfExecutor.AddError(err)
return err
// do not return here so we can still try to kill sidecars
}
// Saving output parameters
err = wfExecutor.SaveParameters()
if err != nil {
wfExecutor.AddError(err)
return err
// do not return here so we can still try to kill sidecars
}
// Saving output artifacts
err = wfExecutor.SaveArtifacts()
if err != nil {
wfExecutor.AddError(err)
// do not return here so we can still try to kill sidecars
}
// Killing sidecar containers
err = wfExecutor.KillSidecars()
if err != nil {
wfExecutor.AddError(err)
return err
Expand Down

0 comments on commit 69fd8a5

Please sign in to comment.