Skip to content

Commit

Permalink
Fix api break
Browse files Browse the repository at this point in the history
  • Loading branch information
yulong-db committed Nov 7, 2024
1 parent 716213c commit 84da98c
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion cmd/thanos/compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/thanos/downsample.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/thanos/receive.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/thanos/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/thanos/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ func runSidecar(
if uploads {
// 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.Sidecar.String())
bkt, err := client.NewBucket(logger, confContentYaml, component.Sidecar.String(), nil)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/thanos/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
20 changes: 10 additions & 10 deletions cmd/thanos/tools_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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")
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/block/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/groupcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/replicate/replicator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit 84da98c

Please sign in to comment.