Skip to content

Commit

Permalink
review changes GoogleContainerTools#1170
Browse files Browse the repository at this point in the history
  • Loading branch information
g-harel committed Mar 19, 2019
1 parent 269f87a commit 016a4cd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/skaffold/kubernetes/wait.go
Expand Up @@ -46,7 +46,7 @@ func watchUntil(ctx context.Context, w watch.Interface, condition func(event *wa
if err != nil {
return fmt.Errorf("condition error: %s", err)
}
if done == true {
if done {
return nil
}
}
Expand All @@ -61,7 +61,7 @@ func WaitForPodScheduled(ctx context.Context, pods corev1.PodInterface, podName
IncludeUninitialized: true,
})
if err != nil {
return err
return fmt.Errorf("initializing pod watcher: %s", err)
}
defer w.Stop()

Expand All @@ -76,13 +76,13 @@ func WaitForPodScheduled(ctx context.Context, pods corev1.PodInterface, podName

// WaitForPodComplete waits until the Pod status is complete.
func WaitForPodComplete(ctx context.Context, pods corev1.PodInterface, podName string, timeout time.Duration) error {
logrus.Infof("Waiting for %s to be ready", podName)
logrus.Infof("Waiting for %s to be complete", podName)

w, err := pods.Watch(meta_v1.ListOptions{
IncludeUninitialized: true,
})
if err != nil {
return err
return fmt.Errorf("initializing pod watcher: %s", err)
}
defer w.Stop()

Expand Down Expand Up @@ -117,7 +117,7 @@ func WaitForPodInitialized(ctx context.Context, pods corev1.PodInterface, podNam
IncludeUninitialized: true,
})
if err != nil {
return err
return fmt.Errorf("initializing pod watcher: %s", err)
}
defer w.Stop()

Expand Down Expand Up @@ -151,7 +151,7 @@ func WaitForDeploymentToStabilize(ctx context.Context, c kubernetes.Interface, n
FieldSelector: fields.AsSelector().String(),
})
if err != nil {
return err
return fmt.Errorf("initializing deployment watcher: %s", err)
}

ctx, cancelTimeout := context.WithTimeout(ctx, timeout)
Expand Down

0 comments on commit 016a4cd

Please sign in to comment.