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: # 1328 argo submit --wait and argo wait quits while workflow is running #1347

Merged
merged 11 commits into from
May 7, 2019
Prev Previous commit
Next Next commit
Fixed argo submit --wait and argo wait quits while workflow is running
  • Loading branch information
sarabala1979 committed Apr 29, 2019
commit 5202711c1f69fe203b0685c060e1a66f195184b0
10 changes: 7 additions & 3 deletions cmd/argo/commands/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ func waitOnOne(workflowName string, ignoreNotFound, quiet bool) {
watchIf, err := wfClient.Watch(opts)
errors.CheckError(err)
defer watchIf.Stop()
for next := range watchIf.ResultChan() {
wf, ok := next.Object.(*wfv1.Workflow)
if !ok {
for{
next := <-watchIf.ResultChan()
wf, _ := next.Object.(*wfv1.Workflow)
if wf == nil {
watchIf.Stop()
watchIf, err = wfClient.Watch(opts)
errors.CheckError(err)
continue
}
if !wf.Status.FinishedAt.IsZero() {
Expand Down