Skip to content

Commit 0c4c823

Browse files
committed
Fix kubePlay to actually wait on serviceContainer
If a service container was created for a pod, kube play was no longer waiting on it to exit before returning. Looks like this was introduced by #17469. Kube play --wait will add tests that will help test this. Just want to fix this before anything is really affected. [NO NEW TESTS NEEDED] Signed-off-by: Urvashi Mohnani <[email protected]>
1 parent 36db47d commit 0c4c823

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/domain/infra/abi/play.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,9 @@ func (ic *ContainerEngine) PlayKube(ctx context.Context, body io.Reader, options
341341
if err := notifyproxy.SendMessage("", message); err != nil {
342342
return nil, err
343343
}
344-
345-
if _, err := serviceContainer.Wait(ctx); err != nil {
346-
return nil, fmt.Errorf("waiting for service container: %w", err)
347-
}
344+
}
345+
if _, err := serviceContainer.Wait(ctx); err != nil {
346+
return nil, fmt.Errorf("waiting for service container: %w", err)
348347
}
349348
}
350349

0 commit comments

Comments
 (0)