Skip to content

Commit

Permalink
Error occurred on pod watch should result in an error on the wait con…
Browse files Browse the repository at this point in the history
…tainer (#1776)
  • Loading branch information
gerdos82 authored and sarabala1979 committed Dec 5, 2019
1 parent b00fea1 commit b99e6a0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions cmd/argoexec/commands/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func waitContainer() error {
}()

// Wait for main container to complete
err := wfExecutor.Wait()
if err != nil {
wfExecutor.AddError(err)
waitErr := wfExecutor.Wait()
if waitErr != nil {
wfExecutor.AddError(waitErr)
// do not return here so we can still try to kill sidecars & save outputs
}

Expand Down Expand Up @@ -72,5 +72,11 @@ func waitContainer() error {
wfExecutor.AddError(err)
return err
}

// To prevent the workflow step from completing successfully, return the error occurred during wait.
if waitErr != nil {
return waitErr
}

return nil
}

0 comments on commit b99e6a0

Please sign in to comment.