Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: Move objstore out of repo #5254

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/thanos/compact.go
Expand Up @@ -38,7 +38,7 @@ import (
"github.com/thanos-io/thanos/pkg/extprom"
extpromhttp "github.com/thanos-io/thanos/pkg/extprom/http"
"github.com/thanos-io/thanos/pkg/logging"
"github.com/thanos-io/thanos/pkg/objstore/client"
"github.com/thanos-io/thanos/pkg/objstoreutil"
"github.com/thanos-io/thanos/pkg/prober"
"github.com/thanos-io/thanos/pkg/runutil"
httpserver "github.com/thanos-io/thanos/pkg/server/http"
Expand Down Expand Up @@ -202,7 +202,7 @@ func runCompact(
return err
}

bkt, err := client.NewBucket(logger, confContentYaml, reg, component.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, component.String())
if err != nil {
return err
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/thanos/downsample.go
Expand Up @@ -22,14 +22,14 @@ import (
"github.com/prometheus/prometheus/tsdb"
"github.com/prometheus/prometheus/tsdb/chunkenc"

"github.com/thanos-io/objstore"
"github.com/thanos-io/thanos/pkg/block"
"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/compact/downsample"
"github.com/thanos-io/thanos/pkg/component"
"github.com/thanos-io/thanos/pkg/errutil"
"github.com/thanos-io/thanos/pkg/extprom"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/thanos/pkg/objstore/client"
"github.com/thanos-io/thanos/pkg/objstoreutil"
"github.com/thanos-io/thanos/pkg/prober"
"github.com/thanos-io/thanos/pkg/runutil"
httpserver "github.com/thanos-io/thanos/pkg/server/http"
Expand Down Expand Up @@ -80,7 +80,7 @@ func RunDownsample(
return err
}

bkt, err := client.NewBucket(logger, confContentYaml, reg, component.Downsample.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, component.Downsample.String())
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/thanos/main_test.go
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/thanos-io/thanos/pkg/block"
"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/compact/downsample"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
"github.com/thanos-io/thanos/pkg/testutil"
"github.com/thanos-io/thanos/pkg/testutil/e2eutil"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/thanos/receive.go
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/tsdb"

"github.com/thanos-io/objstore"
"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/component"
"github.com/thanos-io/thanos/pkg/exemplars"
Expand All @@ -33,8 +34,7 @@ import (
"github.com/thanos-io/thanos/pkg/info"
"github.com/thanos-io/thanos/pkg/info/infopb"
"github.com/thanos-io/thanos/pkg/logging"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/thanos/pkg/objstore/client"
"github.com/thanos-io/thanos/pkg/objstoreutil"
"github.com/thanos-io/thanos/pkg/prober"
"github.com/thanos-io/thanos/pkg/receive"
"github.com/thanos-io/thanos/pkg/runutil"
Expand Down Expand Up @@ -158,7 +158,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, reg, comp.String())
bkt, err = objstoreutil.NewBucket(logger, confContentYaml, reg, comp.String())
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/rule.go
Expand Up @@ -53,7 +53,7 @@ import (
"github.com/thanos-io/thanos/pkg/info"
"github.com/thanos-io/thanos/pkg/info/infopb"
"github.com/thanos-io/thanos/pkg/logging"
"github.com/thanos-io/thanos/pkg/objstore/client"
"github.com/thanos-io/thanos/pkg/objstoreutil"
"github.com/thanos-io/thanos/pkg/prober"
"github.com/thanos-io/thanos/pkg/promclient"
thanosrules "github.com/thanos-io/thanos/pkg/rules"
Expand Down Expand Up @@ -688,7 +688,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, reg, component.Rule.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, component.Rule.String())
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/sidecar.go
Expand Up @@ -34,7 +34,7 @@ import (
"github.com/thanos-io/thanos/pkg/logging"
meta "github.com/thanos-io/thanos/pkg/metadata"
thanosmodel "github.com/thanos-io/thanos/pkg/model"
"github.com/thanos-io/thanos/pkg/objstore/client"
"github.com/thanos-io/thanos/pkg/objstoreutil"
"github.com/thanos-io/thanos/pkg/prober"
"github.com/thanos-io/thanos/pkg/promclient"
"github.com/thanos-io/thanos/pkg/reloader"
Expand Down Expand Up @@ -300,7 +300,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, reg, component.Sidecar.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, component.Sidecar.String())
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/store.go
Expand Up @@ -36,7 +36,7 @@ import (
"github.com/thanos-io/thanos/pkg/info/infopb"
"github.com/thanos-io/thanos/pkg/logging"
"github.com/thanos-io/thanos/pkg/model"
"github.com/thanos-io/thanos/pkg/objstore/client"
"github.com/thanos-io/thanos/pkg/objstoreutil"
"github.com/thanos-io/thanos/pkg/prober"
"github.com/thanos-io/thanos/pkg/runutil"
grpcserver "github.com/thanos-io/thanos/pkg/server/grpc"
Expand Down Expand Up @@ -248,7 +248,7 @@ func runStore(
return err
}

bkt, err := client.NewBucket(logger, confContentYaml, reg, conf.component.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, conf.component.String())
if err != nil {
return errors.Wrap(err, "create bucket client")
}
Expand Down
22 changes: 11 additions & 11 deletions cmd/thanos/tools_bucket.go
Expand Up @@ -41,6 +41,7 @@ import (
"golang.org/x/text/message"
"gopkg.in/yaml.v3"

"github.com/thanos-io/objstore"
v1 "github.com/thanos-io/thanos/pkg/api/blocks"
"github.com/thanos-io/thanos/pkg/block"
"github.com/thanos-io/thanos/pkg/block/metadata"
Expand All @@ -53,8 +54,7 @@ import (
extpromhttp "github.com/thanos-io/thanos/pkg/extprom/http"
"github.com/thanos-io/thanos/pkg/logging"
"github.com/thanos-io/thanos/pkg/model"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/thanos/pkg/objstore/client"
"github.com/thanos-io/thanos/pkg/objstoreutil"
"github.com/thanos-io/thanos/pkg/prober"
"github.com/thanos-io/thanos/pkg/replicate"
"github.com/thanos-io/thanos/pkg/runutil"
Expand Down Expand Up @@ -299,7 +299,7 @@ func registerBucketVerify(app extkingpin.AppClause, objStoreConfig *extflag.Path
return err
}

bkt, err := client.NewBucket(logger, confContentYaml, reg, component.Bucket.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, component.Bucket.String())
if err != nil {
return err
}
Expand All @@ -317,7 +317,7 @@ func registerBucketVerify(app extkingpin.AppClause, objStoreConfig *extflag.Path
}
} else {
// nil Prometheus registerer: don't create conflicting metrics.
backupBkt, err = client.NewBucket(logger, backupconfContentYaml, nil, component.Bucket.String())
backupBkt, err = objstoreutil.NewBucket(logger, backupconfContentYaml, nil, component.Bucket.String())
if err != nil {
return err
}
Expand Down Expand Up @@ -380,7 +380,7 @@ func registerBucketLs(app extkingpin.AppClause, objStoreConfig *extflag.PathOrCo
return err
}

bkt, err := client.NewBucket(logger, confContentYaml, reg, component.Bucket.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, component.Bucket.String())
if err != nil {
return err
}
Expand Down Expand Up @@ -486,7 +486,7 @@ func registerBucketInspect(app extkingpin.AppClause, objStoreConfig *extflag.Pat
return err
}

bkt, err := client.NewBucket(logger, confContentYaml, reg, component.Bucket.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, component.Bucket.String())
if err != nil {
return err
}
Expand Down Expand Up @@ -594,7 +594,7 @@ func registerBucketWeb(app extkingpin.AppClause, objStoreConfig *extflag.PathOrC
return err
}

bkt, err := client.NewBucket(logger, confContentYaml, reg, component.Bucket.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, component.Bucket.String())
if err != nil {
return errors.Wrap(err, "bucket client")
}
Expand Down Expand Up @@ -780,7 +780,7 @@ func registerBucketCleanup(app extkingpin.AppClause, objStoreConfig *extflag.Pat
return err
}

bkt, err := client.NewBucket(logger, confContentYaml, reg, component.Cleanup.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, component.Cleanup.String())
if err != nil {
return err
}
Expand Down Expand Up @@ -1035,7 +1035,7 @@ func registerBucketMarkBlock(app extkingpin.AppClause, objStoreConfig *extflag.P
return err
}

bkt, err := client.NewBucket(logger, confContentYaml, reg, component.Mark.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, component.Mark.String())
if err != nil {
return err
}
Expand Down Expand Up @@ -1099,7 +1099,7 @@ func registerBucketRewrite(app extkingpin.AppClause, objStoreConfig *extflag.Pat
return err
}

bkt, err := client.NewBucket(logger, confContentYaml, reg, component.Rewrite.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, component.Rewrite.String())
if err != nil {
return err
}
Expand Down Expand Up @@ -1306,7 +1306,7 @@ func registerBucketRetention(app extkingpin.AppClause, objStoreConfig *extflag.P
return err
}

bkt, err := client.NewBucket(logger, confContentYaml, reg, component.Retention.String())
bkt, err := objstoreutil.NewBucket(logger, confContentYaml, reg, component.Retention.String())
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions examples/interactive/interactive_test.go
Expand Up @@ -15,8 +15,8 @@ import (
e2einteractive "github.com/efficientgo/e2e/interactive"
e2emonitoring "github.com/efficientgo/e2e/monitoring"
"github.com/pkg/errors"
"github.com/thanos-io/thanos/pkg/objstore/client"
"github.com/thanos-io/thanos/pkg/objstore/s3"
"github.com/thanos-io/objstore/client"
"github.com/thanos-io/objstore/s3"
"github.com/thanos-io/thanos/pkg/testutil"
tracingclient "github.com/thanos-io/thanos/pkg/tracing/client"
"github.com/thanos-io/thanos/pkg/tracing/jaeger"
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/blocks/v1.go
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/thanos-io/thanos/pkg/block/metadata"
extpromhttp "github.com/thanos-io/thanos/pkg/extprom/http"
"github.com/thanos-io/thanos/pkg/logging"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
)

// BlocksAPI is a very simple API used by Thanos Block Viewer.
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/blocks/v1_test.go
Expand Up @@ -25,7 +25,7 @@ import (
baseAPI "github.com/thanos-io/thanos/pkg/api"
"github.com/thanos-io/thanos/pkg/block"
"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
"github.com/thanos-io/thanos/pkg/testutil"
"github.com/thanos-io/thanos/pkg/testutil/e2eutil"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/block/block.go
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/prometheus/client_golang/prometheus"

"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
"github.com/thanos-io/thanos/pkg/runutil"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/block/block_test.go
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/prometheus/prometheus/model/labels"

"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
"github.com/thanos-io/thanos/pkg/testutil"
"github.com/thanos-io/thanos/pkg/testutil/e2eutil"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/block/fetcher.go
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/thanos-io/thanos/pkg/errutil"
"github.com/thanos-io/thanos/pkg/extprom"
"github.com/thanos-io/thanos/pkg/model"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
"github.com/thanos-io/thanos/pkg/runutil"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/block/fetcher_test.go
Expand Up @@ -28,8 +28,8 @@ import (
"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/extprom"
"github.com/thanos-io/thanos/pkg/model"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/thanos/pkg/objstore/objtesting"
"github.com/thanos-io/objstore"
"github.com/thanos-io/objstore/objtesting"
"github.com/thanos-io/thanos/pkg/testutil"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/block/indexheader/binary_reader.go
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/prometheus/prometheus/tsdb/index"

"github.com/thanos-io/thanos/pkg/block"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
"github.com/thanos-io/thanos/pkg/runutil"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/block/indexheader/header_test.go
Expand Up @@ -23,8 +23,8 @@ import (

"github.com/thanos-io/thanos/pkg/block"
"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/thanos/pkg/objstore/filesystem"
"github.com/thanos-io/objstore"
"github.com/thanos-io/objstore/filesystem"
"github.com/thanos-io/thanos/pkg/testutil"
"github.com/thanos-io/thanos/pkg/testutil/e2eutil"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/block/indexheader/lazy_binary_reader.go
Expand Up @@ -20,7 +20,7 @@ import (
"go.uber.org/atomic"

"github.com/thanos-io/thanos/pkg/block"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/block/indexheader/lazy_binary_reader_test.go
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/thanos-io/thanos/pkg/block"
"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/objstore/filesystem"
"github.com/thanos-io/objstore/filesystem"
"github.com/thanos-io/thanos/pkg/testutil"
"github.com/thanos-io/thanos/pkg/testutil/e2eutil"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/block/indexheader/reader_pool.go
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"

"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
)

// ReaderPoolMetrics holds metrics tracked by ReaderPool.
Expand Down
2 changes: 1 addition & 1 deletion pkg/block/indexheader/reader_pool_test.go
Expand Up @@ -17,7 +17,7 @@ import (

"github.com/thanos-io/thanos/pkg/block"
"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/objstore/filesystem"
"github.com/thanos-io/objstore/filesystem"
"github.com/thanos-io/thanos/pkg/testutil"
"github.com/thanos-io/thanos/pkg/testutil/e2eutil"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/block/metadata/markers.go
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/oklog/ulid"
"github.com/pkg/errors"

"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
"github.com/thanos-io/thanos/pkg/runutil"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/block/metadata/markers_test.go
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/pkg/errors"
"go.uber.org/goleak"

"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
"github.com/thanos-io/thanos/pkg/testutil"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/caching_bucket_config.go
Expand Up @@ -6,7 +6,7 @@ package cache
import (
"time"

"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
)

// Codec for encoding and decoding results of Iter call.
Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/groupcache.go
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/thanos-io/thanos/pkg/discovery/dns"
"github.com/thanos-io/thanos/pkg/extprom"
"github.com/thanos-io/thanos/pkg/model"
"github.com/thanos-io/thanos/pkg/objstore"
"github.com/thanos-io/objstore"
"github.com/thanos-io/thanos/pkg/runutil"
"github.com/thanos-io/thanos/pkg/store/cache/cachekey"
"github.com/vimeo/galaxycache"
Expand Down