From acc4cc7d29ad1ef472ae67929c75b0584c763701 Mon Sep 17 00:00:00 2001 From: Itamar Yuran Date: Tue, 24 Dec 2024 16:52:26 +0100 Subject: [PATCH] with docs --- pkg/block/s3/client_cache.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/block/s3/client_cache.go b/pkg/block/s3/client_cache.go index e08c7922c7c..4369f810e48 100644 --- a/pkg/block/s3/client_cache.go +++ b/pkg/block/s3/client_cache.go @@ -142,6 +142,7 @@ func (c *ClientCache) cachedClientByRegion(region string) (*s3.Client, bool) { func (c *ClientCache) refreshBucketRegion(ctx context.Context, bucket string) string { region, err := c.s3RegionGetter(ctx, bucket) + // error can be nil also in case region is empty if err != nil || region == "" { // fallback to default region region = c.awsConfig.Region