Skip to content

Commit

Permalink
Upgrade thanos version to v0.37.0 (#6385)
Browse files Browse the repository at this point in the history
  • Loading branch information
SungJin1212 authored Nov 30, 2024
1 parent ecc7172 commit d33f878
Show file tree
Hide file tree
Showing 33 changed files with 594 additions and 192 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ require (
github.com/sony/gobreaker v1.0.0
github.com/spf13/afero v1.11.0
github.com/stretchr/testify v1.10.0
github.com/thanos-io/objstore v0.0.0-20241028150459-cfdd0e50390d
github.com/thanos-io/promql-engine v0.0.0-20240921092401-37747eddbd31
github.com/thanos-io/thanos v0.35.2-0.20241118113652-f998fc59c171
github.com/thanos-io/objstore v0.0.0-20241111205755-d1dd89d41f97
github.com/thanos-io/promql-engine v0.0.0-20241106100125-097e6e9f425a
github.com/thanos-io/thanos v0.37.0
github.com/uber/jaeger-client-go v2.30.0+incompatible
github.com/weaveworks/common v0.0.0-20230728070032-dd9e68f319d5
go.etcd.io/etcd/api/v3 v3.5.17
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1684,12 +1684,12 @@ github.com/tencentyun/cos-go-sdk-v5 v0.7.40 h1:W6vDGKCHe4wBACI1d2UgE6+50sJFhRWU4
github.com/tencentyun/cos-go-sdk-v5 v0.7.40/go.mod h1:4dCEtLHGh8QPxHEkgq+nFaky7yZxQuYwgSJM87icDaw=
github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e h1:f1Zsv7OAU9iQhZwigp50Yl38W10g/vd5NC8Rdk1Jzng=
github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e/go.mod h1:jXcofnrSln/cLI6/dhlBxPQZEEQHVPCcFaH75M+nSzM=
github.com/thanos-io/objstore v0.0.0-20241028150459-cfdd0e50390d h1:k+SLTP1mjNqXxsCiq4UYeKCe07le0ieffyuHm/YfmH8=
github.com/thanos-io/objstore v0.0.0-20241028150459-cfdd0e50390d/go.mod h1:/ZMUxFcp/nT6oYV5WslH9k07NU/+86+aibgZRmMMr/4=
github.com/thanos-io/promql-engine v0.0.0-20240921092401-37747eddbd31 h1:xPaP58g+3EPohdw4cv+6jv5+LcX6LynhHvQcYwTAMxQ=
github.com/thanos-io/promql-engine v0.0.0-20240921092401-37747eddbd31/go.mod h1:wx0JlRZtsB2S10JYUgeg5GqLfMxw31SzArP+28yyE00=
github.com/thanos-io/thanos v0.35.2-0.20241118113652-f998fc59c171 h1:khQQmo9VMMphKm10NS22iI8bAIf4DNRFvLoP4IR7kK4=
github.com/thanos-io/thanos v0.35.2-0.20241118113652-f998fc59c171/go.mod h1:v2AUVRd44iuv/PY0iwzKzgosLusUg7/dnnw5KEe1Has=
github.com/thanos-io/objstore v0.0.0-20241111205755-d1dd89d41f97 h1:VjG0mwhN1DkncwDHFvrpd12/2TLfgYNRmEQA48ikp+0=
github.com/thanos-io/objstore v0.0.0-20241111205755-d1dd89d41f97/go.mod h1:vyzFrBXgP+fGNG2FopEGWOO/zrIuoy7zt3LpLeezRsw=
github.com/thanos-io/promql-engine v0.0.0-20241106100125-097e6e9f425a h1:BhWU58VHOxkxQEMByih9fM2WwuwCGtk5AulIcSRSr0A=
github.com/thanos-io/promql-engine v0.0.0-20241106100125-097e6e9f425a/go.mod h1:wx0JlRZtsB2S10JYUgeg5GqLfMxw31SzArP+28yyE00=
github.com/thanos-io/thanos v0.37.0 h1:RCO2pL3S1sU6Wd3ITviWSzouFg8VVzpz92eCJOUEnow=
github.com/thanos-io/thanos v0.37.0/go.mod h1:bkdS9wnItzpNofJjjp2R7Y5Xt5UeA688dLKcjmf7MaA=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o=
Expand Down
4 changes: 2 additions & 2 deletions pkg/ruler/rulestore/bucketclient/bucket_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (b *BucketRuleStore) ListAllRuleGroups(ctx context.Context) (map[string]rul
Name: group,
})
return nil
}, objstore.WithRecursiveIter)
}, objstore.WithRecursiveIter())

if err != nil {
return nil, err
Expand Down Expand Up @@ -163,7 +163,7 @@ func (b *BucketRuleStore) ListRuleGroupsForUserAndNamespace(ctx context.Context,
Name: group,
})
return nil
}, objstore.WithRecursiveIter)
}, objstore.WithRecursiveIter())
if err != nil {
return nil, err
}
Expand Down
10 changes: 10 additions & 0 deletions pkg/storage/bucket/client_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ func (m *ClientMock) Name() string {
return "mock"
}

func (m *ClientMock) IterWithAttributes(ctx context.Context, dir string, f func(attrs objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
args := m.Called(ctx, dir, f, options)
return args.Error(0)
}

func (m *ClientMock) SupportedIterOptions() []objstore.IterOptionType {
args := m.Called()
return args.Get(0).([]objstore.IterOptionType)
}

// Iter mocks objstore.Bucket.Iter()
func (m *ClientMock) Iter(ctx context.Context, dir string, f func(string) error, options ...objstore.IterOption) error {
args := m.Called(ctx, dir, f, options)
Expand Down
9 changes: 9 additions & 0 deletions pkg/storage/bucket/prefixed_bucket_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ func (b *PrefixedBucketClient) Delete(ctx context.Context, name string) error {
// Name returns the bucket name for the provider.
func (b *PrefixedBucketClient) Name() string { return b.bucket.Name() }

// TODO(Sungjin1212): Implement if needed
func (b *PrefixedBucketClient) IterWithAttributes(ctx context.Context, dir string, f func(attrs objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
return b.bucket.IterWithAttributes(ctx, dir, f, options...)
}

func (b *PrefixedBucketClient) SupportedIterOptions() []objstore.IterOptionType {
return b.bucket.SupportedIterOptions()
}

// Iter calls f for each entry in the given directory (not recursive.). The argument to f is the full
// object name including the prefix of the inspected directory. The configured prefix will be stripped
// before supplied function is applied.
Expand Down
10 changes: 10 additions & 0 deletions pkg/storage/bucket/s3/bucket_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ func (b *BucketWithRetries) Name() string {
return b.bucket.Name()
}

func (b *BucketWithRetries) IterWithAttributes(ctx context.Context, dir string, f func(attrs objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
return b.retry(ctx, func() error {
return b.bucket.IterWithAttributes(ctx, dir, f, options...)
}, fmt.Sprintf("IterWithAttributes %s", dir))
}

func (b *BucketWithRetries) SupportedIterOptions() []objstore.IterOptionType {
return b.bucket.SupportedIterOptions()
}

func (b *BucketWithRetries) Iter(ctx context.Context, dir string, f func(string) error, options ...objstore.IterOption) error {
return b.retry(ctx, func() error {
return b.bucket.Iter(ctx, dir, f, options...)
Expand Down
10 changes: 10 additions & 0 deletions pkg/storage/bucket/s3/bucket_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,16 @@ func (m *mockBucket) Name() string {
return "mock"
}

// IterWithAttributes mocks objstore.Bucket.IterWithAttributes()
func (m *mockBucket) IterWithAttributes(ctx context.Context, dir string, f func(attrs objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
return nil
}

// SupportedIterOptions mocks objstore.Bucket.SupportedIterOptions()
func (m *mockBucket) SupportedIterOptions() []objstore.IterOptionType {
return nil
}

// Iter mocks objstore.Bucket.Iter()
func (m *mockBucket) Iter(ctx context.Context, dir string, f func(string) error, options ...objstore.IterOption) error {
return nil
Expand Down
8 changes: 8 additions & 0 deletions pkg/storage/bucket/sse_bucket_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ func (b *SSEBucketClient) getCustomS3SSEConfig() (encrypt.ServerSide, error) {
return sse, nil
}

func (b *SSEBucketClient) IterWithAttributes(ctx context.Context, dir string, f func(attrs objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
return b.bucket.IterWithAttributes(ctx, dir, f, options...)
}

func (b *SSEBucketClient) SupportedIterOptions() []objstore.IterOptionType {
return b.bucket.SupportedIterOptions()
}

// Iter implements objstore.Bucket.
func (b *SSEBucketClient) Iter(ctx context.Context, dir string, f func(string) error, options ...objstore.IterOption) error {
return b.bucket.Iter(ctx, dir, f, options...)
Expand Down
10 changes: 10 additions & 0 deletions pkg/storage/tsdb/bucketindex/markers_bucket_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ func (b *globalMarkersBucket) Close() error {
return b.parent.Close()
}

// IterWithAttributes implements objstore.Bucket.
func (b *globalMarkersBucket) IterWithAttributes(ctx context.Context, dir string, f func(attrs objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
return b.parent.IterWithAttributes(ctx, dir, f, options...)
}

// SupportedIterOptions implements objstore.Bucket.
func (b *globalMarkersBucket) SupportedIterOptions() []objstore.IterOptionType {
return b.parent.SupportedIterOptions()
}

// Iter implements objstore.Bucket.
func (b *globalMarkersBucket) Iter(ctx context.Context, dir string, f func(string) error, options ...objstore.IterOption) error {
return b.parent.Iter(ctx, dir, f, options...)
Expand Down
2 changes: 2 additions & 0 deletions vendor/github.com/thanos-io/objstore/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 19 additions & 4 deletions vendor/github.com/thanos-io/objstore/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions vendor/github.com/thanos-io/objstore/inmem.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d33f878

Please sign in to comment.