From 77b5f5f31b2686c6cc3c794edf11b90e4c558c43 Mon Sep 17 00:00:00 2001 From: Christopher Li Date: Wed, 8 May 2024 15:08:27 -0700 Subject: [PATCH 1/2] return when encountering error --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index abad470..6ccf22a 100644 --- a/main.go +++ b/main.go @@ -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 @@ -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)) From b206582dac920711c733bcf6ad8065deaaa4dcc5 Mon Sep 17 00:00:00 2001 From: Christopher Li Date: Thu, 9 May 2024 17:40:36 -0700 Subject: [PATCH 2/2] remove whitespace --- main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/main.go b/main.go index 6ccf22a..0da18ea 100644 --- a/main.go +++ b/main.go @@ -98,7 +98,6 @@ 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