diff --git a/cmd/thanos/compact.go b/cmd/thanos/compact.go index ddaf702d855..741fc664ef2 100644 --- a/cmd/thanos/compact.go +++ b/cmd/thanos/compact.go @@ -205,7 +205,7 @@ func runCompact( return err } - bkt, err := client.NewBucket(logger, confContentYaml, component.String()) + bkt, err := client.NewBucket(logger, confContentYaml, component.String(), nil) if err != nil { return err } diff --git a/cmd/thanos/downsample.go b/cmd/thanos/downsample.go index a5cd5c38edf..556369b0a1f 100644 --- a/cmd/thanos/downsample.go +++ b/cmd/thanos/downsample.go @@ -84,7 +84,7 @@ func RunDownsample( return err } - bkt, err := client.NewBucket(logger, confContentYaml, component.Downsample.String()) + bkt, err := client.NewBucket(logger, confContentYaml, component.Downsample.String(), nil) if err != nil { return err } diff --git a/cmd/thanos/receive.go b/cmd/thanos/receive.go index 569ec1e57ef..5db1d51631a 100644 --- a/cmd/thanos/receive.go +++ b/cmd/thanos/receive.go @@ -195,7 +195,7 @@ func runReceive( } // The background shipper continuously scans the data directory and uploads // new blocks to object storage service. - bkt, err = client.NewBucket(logger, confContentYaml, comp.String()) + bkt, err = client.NewBucket(logger, confContentYaml, comp.String(), nil) if err != nil { return err } diff --git a/cmd/thanos/rule.go b/cmd/thanos/rule.go index ad793d17a44..62b42761a75 100644 --- a/cmd/thanos/rule.go +++ b/cmd/thanos/rule.go @@ -843,7 +843,7 @@ func runRule( if len(confContentYaml) > 0 { // The background shipper continuously scans the data directory and uploads // new blocks to Google Cloud Storage or an S3-compatible storage service. - bkt, err := client.NewBucket(logger, confContentYaml, component.Rule.String()) + bkt, err := client.NewBucket(logger, confContentYaml, component.Rule.String(), nil) if err != nil { return err } diff --git a/cmd/thanos/store.go b/cmd/thanos/store.go index d626fe55d88..0c5eb780a12 100644 --- a/cmd/thanos/store.go +++ b/cmd/thanos/store.go @@ -309,7 +309,7 @@ func runStore( return err } - bkt, err := client.NewBucket(logger, confContentYaml, conf.component.String()) + bkt, err := client.NewBucket(logger, confContentYaml, conf.component.String(), nil) if err != nil { return err } diff --git a/cmd/thanos/tools_bucket.go b/cmd/thanos/tools_bucket.go index 7e711168cfd..7875d9c0a04 100644 --- a/cmd/thanos/tools_bucket.go +++ b/cmd/thanos/tools_bucket.go @@ -327,7 +327,7 @@ func registerBucketVerify(app extkingpin.AppClause, objStoreConfig *extflag.Path return err } - bkt, err := client.NewBucket(logger, confContentYaml, component.Bucket.String()) + bkt, err := client.NewBucket(logger, confContentYaml, component.Bucket.String(), nil) if err != nil { return err } @@ -346,7 +346,7 @@ func registerBucketVerify(app extkingpin.AppClause, objStoreConfig *extflag.Path } } else { // nil Prometheus registerer: don't create conflicting metrics. - backupBkt, err = client.NewBucket(logger, backupconfContentYaml, component.Bucket.String()) + backupBkt, err = client.NewBucket(logger, backupconfContentYaml, component.Bucket.String(), nil) if err != nil { return err } @@ -411,7 +411,7 @@ func registerBucketLs(app extkingpin.AppClause, objStoreConfig *extflag.PathOrCo return err } - bkt, err := client.NewBucket(logger, confContentYaml, component.Bucket.String()) + bkt, err := client.NewBucket(logger, confContentYaml, component.Bucket.String(), nil) if err != nil { return err } @@ -519,7 +519,7 @@ func registerBucketInspect(app extkingpin.AppClause, objStoreConfig *extflag.Pat return err } - bkt, err := client.NewBucket(logger, confContentYaml, component.Bucket.String()) + bkt, err := client.NewBucket(logger, confContentYaml, component.Bucket.String(), nil) if err != nil { return err } @@ -629,7 +629,7 @@ func registerBucketWeb(app extkingpin.AppClause, objStoreConfig *extflag.PathOrC return err } - bkt, err := client.NewBucket(logger, confContentYaml, component.Bucket.String()) + bkt, err := client.NewBucket(logger, confContentYaml, component.Bucket.String(), nil) if err != nil { return errors.Wrap(err, "bucket client") } @@ -826,7 +826,7 @@ func registerBucketCleanup(app extkingpin.AppClause, objStoreConfig *extflag.Pat return err } - bkt, err := client.NewBucket(logger, confContentYaml, component.Cleanup.String()) + bkt, err := client.NewBucket(logger, confContentYaml, component.Cleanup.String(), nil) if err != nil { return err } @@ -1083,7 +1083,7 @@ func registerBucketMarkBlock(app extkingpin.AppClause, objStoreConfig *extflag.P return err } - bkt, err := client.NewBucket(logger, confContentYaml, component.Mark.String()) + bkt, err := client.NewBucket(logger, confContentYaml, component.Mark.String(), nil) if err != nil { return err } @@ -1163,7 +1163,7 @@ func registerBucketRewrite(app extkingpin.AppClause, objStoreConfig *extflag.Pat return err } - bkt, err := client.NewBucket(logger, confContentYaml, component.Rewrite.String()) + bkt, err := client.NewBucket(logger, confContentYaml, component.Rewrite.String(), nil) if err != nil { return err } @@ -1371,7 +1371,7 @@ func registerBucketRetention(app extkingpin.AppClause, objStoreConfig *extflag.P return err } - bkt, err := client.NewBucket(logger, confContentYaml, component.Retention.String()) + bkt, err := client.NewBucket(logger, confContentYaml, component.Retention.String(), nil) if err != nil { return err } @@ -1460,7 +1460,7 @@ func registerBucketUploadBlocks(app extkingpin.AppClause, objStoreConfig *extfla return errors.Wrap(err, "unable to parse objstore config") } - bkt, err := client.NewBucket(logger, confContentYaml, component.Upload.String()) + bkt, err := client.NewBucket(logger, confContentYaml, component.Upload.String(), nil) if err != nil { return errors.Wrap(err, "unable to create bucket") } diff --git a/pkg/block/fetcher.go b/pkg/block/fetcher.go index f3204b651f0..28fdf17a6a8 100644 --- a/pkg/block/fetcher.go +++ b/pkg/block/fetcher.go @@ -252,7 +252,7 @@ func (f *RecursiveLister) GetActiveAndPartialBlockIDs(ctx context.Context, ch ch case ch <- id: } return nil - }, objstore.WithRecursiveIter) + }, objstore.WithRecursiveIter()) return partialBlocks, err } diff --git a/pkg/cache/groupcache.go b/pkg/cache/groupcache.go index 609959d0cb4..d105dcb022f 100644 --- a/pkg/cache/groupcache.go +++ b/pkg/cache/groupcache.go @@ -208,7 +208,7 @@ func NewGroupcacheWithConfig(logger log.Logger, reg prometheus.Registerer, conf if err := bucket.Iter(ctx, parsedData.Name, func(s string) error { list = append(list, s) return nil - }, objstore.WithRecursiveIter); err != nil { + }, objstore.WithRecursiveIter()); err != nil { return err } diff --git a/pkg/replicate/replicator.go b/pkg/replicate/replicator.go index 668d64afce9..dc9e804f563 100644 --- a/pkg/replicate/replicator.go +++ b/pkg/replicate/replicator.go @@ -115,7 +115,7 @@ func RunReplicate( return errors.New("No supported bucket was configured to replicate from") } - bkt, err := client.NewBucket(logger, fromConfContentYaml, component.Replicate.String()) + bkt, err := client.NewBucket(logger, fromConfContentYaml, component.Replicate.String(), nil) if err != nil { return err } @@ -136,7 +136,7 @@ func RunReplicate( return errors.New("No supported bucket was configured to replicate to") } - toBkt, err := client.NewBucket(logger, toConfContentYaml, component.Replicate.String()) + toBkt, err := client.NewBucket(logger, toConfContentYaml, component.Replicate.String(), nil) if err != nil { return err }