Skip to content

Commit

Permalink
return when encountering error
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherzli committed May 8, 2024
1 parent 26f12fd commit 77b5f5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func parseFlags() CmdConfig {
flag.DurationVar(&config.ScaleTimeout, "scale-timeout", defaultScaleTimeout, "A timeout to wait for receivers to really start after they report healthy")
flag.BoolVar(&config.useAzAwareHashRing, "use-az-aware-hashring", false, "A boolean to use az aware hashring to comply with Thanos v0.32+")
flag.StringVar(&config.podAzAnnotationKey, "pod-az-annotation-key", "", "pod annotation key for AZ Info, If not specified or key not found, will use sts name as AZ key")

flag.Parse()

return config
Expand Down Expand Up @@ -580,7 +581,7 @@ func (c *controller) sync(ctx context.Context) {

if err := c.waitForPod(ctx, podName); err != nil {
level.Warn(c.logger).Log("msg", "failed polling until pod is ready", "pod", podName, "duration", time.Since(start), "err", err)
continue
return
}

level.Debug(c.logger).Log("msg", "waited until new pod was ready", "pod", podName, "duration", time.Since(start))
Expand Down

0 comments on commit 77b5f5f

Please sign in to comment.