diff --git a/go.mod b/go.mod index c43da1b2293..74fc1b6bdd8 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( github.com/sirupsen/logrus v1.8.1 github.com/spf13/afero v1.6.0 github.com/stretchr/testify v1.7.1 - github.com/thanos-io/thanos v0.26.1-0.20220524120302-5d49fbc057c4 + github.com/thanos-io/thanos v0.26.1-0.20220602051129-a6f6ce060ed4 github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/weaveworks/common v0.0.0-20211109170639-0684aab3d884 go.uber.org/atomic v1.9.0 diff --git a/go.sum b/go.sum index 61ffc4f2bd2..5defb3660c8 100644 --- a/go.sum +++ b/go.sum @@ -1784,8 +1784,8 @@ github.com/thanos-io/thanos v0.13.1-0.20210226164558-03dace0a1aa1/go.mod h1:gMCy github.com/thanos-io/thanos v0.13.1-0.20210401085038-d7dff0c84d17/go.mod h1:zU8KqE+6A+HksK4wiep8e/3UvCZLm+Wrw9AqZGaAm9k= github.com/thanos-io/thanos v0.22.0/go.mod h1:SZDWz3phcUcBr4MYFoPFRvl+Z9Nbi45HlwQlwSZSt+Q= github.com/thanos-io/thanos v0.24.0/go.mod h1:sfnKJG7cDA41ixNL4gsTJEa3w9Qt8lwAjw+dqRMSDG0= -github.com/thanos-io/thanos v0.26.1-0.20220524120302-5d49fbc057c4 h1:QKs0sZZjhFN517LFtNUTpzKdHBMEIwgicJarGqQ6puI= -github.com/thanos-io/thanos v0.26.1-0.20220524120302-5d49fbc057c4/go.mod h1:9e/ytDfVepSKxihUWXyy1irj+ipM/DAlOBqsyXs+Y10= +github.com/thanos-io/thanos v0.26.1-0.20220602051129-a6f6ce060ed4 h1:8tOJip28qYUWl9aO4CfgFRUI60xujkdu+DljSbNixSc= +github.com/thanos-io/thanos v0.26.1-0.20220602051129-a6f6ce060ed4/go.mod h1:9e/ytDfVepSKxihUWXyy1irj+ipM/DAlOBqsyXs+Y10= github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab h1:7ZR3hmisBWw77ZpO1/o86g+JV3VKlk3d48jopJxzTjU= github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab/go.mod h1:eheTFp954zcWZXCU8d0AT76ftsQOTo4DTqkN/h3k1MY= github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= diff --git a/vendor/github.com/thanos-io/thanos/pkg/block/block.go b/vendor/github.com/thanos-io/thanos/pkg/block/block.go index d44b4c283bd..fa2b6706267 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/block/block.go +++ b/vendor/github.com/thanos-io/thanos/pkg/block/block.go @@ -136,7 +136,7 @@ func upload(ctx context.Context, logger log.Logger, bkt objstore.Bucket, bdir st } metaEncoded := strings.Builder{} - meta.Thanos.Files, err = gatherFileStats(bdir, hf, logger) + meta.Thanos.Files, err = GatherFileStats(bdir, hf, logger) if err != nil { return errors.Wrap(err, "gather meta file stats") } @@ -316,8 +316,8 @@ func GetSegmentFiles(blockDir string) []string { return result } -// TODO(bwplotka): Gather stats when dirctly uploading files. -func gatherFileStats(blockDir string, hf metadata.HashFunc, logger log.Logger) (res []metadata.File, _ error) { +// GatherFileStats returns metadata.File entry for files inside TSDB block (index, chunks, meta.json). +func GatherFileStats(blockDir string, hf metadata.HashFunc, logger log.Logger) (res []metadata.File, _ error) { files, err := ioutil.ReadDir(filepath.Join(blockDir, ChunksDirname)) if err != nil { return nil, errors.Wrapf(err, "read dir %v", filepath.Join(blockDir, ChunksDirname)) @@ -363,7 +363,6 @@ func gatherFileStats(blockDir string, hf metadata.HashFunc, logger log.Logger) ( sort.Slice(res, func(i, j int) bool { return strings.Compare(res[i].RelPath, res[j].RelPath) < 0 }) - // TODO(bwplotka): Add optional files like tombstones? return res, err } diff --git a/vendor/modules.txt b/vendor/modules.txt index 737a60a75dc..01f5d561375 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -804,7 +804,7 @@ github.com/stretchr/objx github.com/stretchr/testify/assert github.com/stretchr/testify/mock github.com/stretchr/testify/require -# github.com/thanos-io/thanos v0.26.1-0.20220524120302-5d49fbc057c4 +# github.com/thanos-io/thanos v0.26.1-0.20220602051129-a6f6ce060ed4 ## explicit; go 1.17 github.com/thanos-io/thanos/pkg/block github.com/thanos-io/thanos/pkg/block/metadata