Skip to content

Commit d33f878

Browse files
authored
Upgrade thanos version to v0.37.0 (#6385)
1 parent ecc7172 commit d33f878

File tree

33 files changed

+594
-192
lines changed

33 files changed

+594
-192
lines changed

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ require (
5151
github.com/sony/gobreaker v1.0.0
5252
github.com/spf13/afero v1.11.0
5353
github.com/stretchr/testify v1.10.0
54-
github.com/thanos-io/objstore v0.0.0-20241028150459-cfdd0e50390d
55-
github.com/thanos-io/promql-engine v0.0.0-20240921092401-37747eddbd31
56-
github.com/thanos-io/thanos v0.35.2-0.20241118113652-f998fc59c171
54+
github.com/thanos-io/objstore v0.0.0-20241111205755-d1dd89d41f97
55+
github.com/thanos-io/promql-engine v0.0.0-20241106100125-097e6e9f425a
56+
github.com/thanos-io/thanos v0.37.0
5757
github.com/uber/jaeger-client-go v2.30.0+incompatible
5858
github.com/weaveworks/common v0.0.0-20230728070032-dd9e68f319d5
5959
go.etcd.io/etcd/api/v3 v3.5.17

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,12 +1684,12 @@ github.com/tencentyun/cos-go-sdk-v5 v0.7.40 h1:W6vDGKCHe4wBACI1d2UgE6+50sJFhRWU4
16841684
github.com/tencentyun/cos-go-sdk-v5 v0.7.40/go.mod h1:4dCEtLHGh8QPxHEkgq+nFaky7yZxQuYwgSJM87icDaw=
16851685
github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e h1:f1Zsv7OAU9iQhZwigp50Yl38W10g/vd5NC8Rdk1Jzng=
16861686
github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e/go.mod h1:jXcofnrSln/cLI6/dhlBxPQZEEQHVPCcFaH75M+nSzM=
1687-
github.com/thanos-io/objstore v0.0.0-20241028150459-cfdd0e50390d h1:k+SLTP1mjNqXxsCiq4UYeKCe07le0ieffyuHm/YfmH8=
1688-
github.com/thanos-io/objstore v0.0.0-20241028150459-cfdd0e50390d/go.mod h1:/ZMUxFcp/nT6oYV5WslH9k07NU/+86+aibgZRmMMr/4=
1689-
github.com/thanos-io/promql-engine v0.0.0-20240921092401-37747eddbd31 h1:xPaP58g+3EPohdw4cv+6jv5+LcX6LynhHvQcYwTAMxQ=
1690-
github.com/thanos-io/promql-engine v0.0.0-20240921092401-37747eddbd31/go.mod h1:wx0JlRZtsB2S10JYUgeg5GqLfMxw31SzArP+28yyE00=
1691-
github.com/thanos-io/thanos v0.35.2-0.20241118113652-f998fc59c171 h1:khQQmo9VMMphKm10NS22iI8bAIf4DNRFvLoP4IR7kK4=
1692-
github.com/thanos-io/thanos v0.35.2-0.20241118113652-f998fc59c171/go.mod h1:v2AUVRd44iuv/PY0iwzKzgosLusUg7/dnnw5KEe1Has=
1687+
github.com/thanos-io/objstore v0.0.0-20241111205755-d1dd89d41f97 h1:VjG0mwhN1DkncwDHFvrpd12/2TLfgYNRmEQA48ikp+0=
1688+
github.com/thanos-io/objstore v0.0.0-20241111205755-d1dd89d41f97/go.mod h1:vyzFrBXgP+fGNG2FopEGWOO/zrIuoy7zt3LpLeezRsw=
1689+
github.com/thanos-io/promql-engine v0.0.0-20241106100125-097e6e9f425a h1:BhWU58VHOxkxQEMByih9fM2WwuwCGtk5AulIcSRSr0A=
1690+
github.com/thanos-io/promql-engine v0.0.0-20241106100125-097e6e9f425a/go.mod h1:wx0JlRZtsB2S10JYUgeg5GqLfMxw31SzArP+28yyE00=
1691+
github.com/thanos-io/thanos v0.37.0 h1:RCO2pL3S1sU6Wd3ITviWSzouFg8VVzpz92eCJOUEnow=
1692+
github.com/thanos-io/thanos v0.37.0/go.mod h1:bkdS9wnItzpNofJjjp2R7Y5Xt5UeA688dLKcjmf7MaA=
16931693
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
16941694
github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
16951695
github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o=

pkg/ruler/rulestore/bucketclient/bucket_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func (b *BucketRuleStore) ListAllRuleGroups(ctx context.Context) (map[string]rul
126126
Name: group,
127127
})
128128
return nil
129-
}, objstore.WithRecursiveIter)
129+
}, objstore.WithRecursiveIter())
130130

131131
if err != nil {
132132
return nil, err
@@ -163,7 +163,7 @@ func (b *BucketRuleStore) ListRuleGroupsForUserAndNamespace(ctx context.Context,
163163
Name: group,
164164
})
165165
return nil
166-
}, objstore.WithRecursiveIter)
166+
}, objstore.WithRecursiveIter())
167167
if err != nil {
168168
return nil, err
169169
}

pkg/storage/bucket/client_mock.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ func (m *ClientMock) Name() string {
5757
return "mock"
5858
}
5959

60+
func (m *ClientMock) IterWithAttributes(ctx context.Context, dir string, f func(attrs objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
61+
args := m.Called(ctx, dir, f, options)
62+
return args.Error(0)
63+
}
64+
65+
func (m *ClientMock) SupportedIterOptions() []objstore.IterOptionType {
66+
args := m.Called()
67+
return args.Get(0).([]objstore.IterOptionType)
68+
}
69+
6070
// Iter mocks objstore.Bucket.Iter()
6171
func (m *ClientMock) Iter(ctx context.Context, dir string, f func(string) error, options ...objstore.IterOption) error {
6272
args := m.Called(ctx, dir, f, options)

pkg/storage/bucket/prefixed_bucket_client.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ func (b *PrefixedBucketClient) Delete(ctx context.Context, name string) error {
4444
// Name returns the bucket name for the provider.
4545
func (b *PrefixedBucketClient) Name() string { return b.bucket.Name() }
4646

47+
// TODO(Sungjin1212): Implement if needed
48+
func (b *PrefixedBucketClient) IterWithAttributes(ctx context.Context, dir string, f func(attrs objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
49+
return b.bucket.IterWithAttributes(ctx, dir, f, options...)
50+
}
51+
52+
func (b *PrefixedBucketClient) SupportedIterOptions() []objstore.IterOptionType {
53+
return b.bucket.SupportedIterOptions()
54+
}
55+
4756
// Iter calls f for each entry in the given directory (not recursive.). The argument to f is the full
4857
// object name including the prefix of the inspected directory. The configured prefix will be stripped
4958
// before supplied function is applied.

pkg/storage/bucket/s3/bucket_client.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,16 @@ func (b *BucketWithRetries) Name() string {
149149
return b.bucket.Name()
150150
}
151151

152+
func (b *BucketWithRetries) IterWithAttributes(ctx context.Context, dir string, f func(attrs objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
153+
return b.retry(ctx, func() error {
154+
return b.bucket.IterWithAttributes(ctx, dir, f, options...)
155+
}, fmt.Sprintf("IterWithAttributes %s", dir))
156+
}
157+
158+
func (b *BucketWithRetries) SupportedIterOptions() []objstore.IterOptionType {
159+
return b.bucket.SupportedIterOptions()
160+
}
161+
152162
func (b *BucketWithRetries) Iter(ctx context.Context, dir string, f func(string) error, options ...objstore.IterOption) error {
153163
return b.retry(ctx, func() error {
154164
return b.bucket.Iter(ctx, dir, f, options...)

pkg/storage/bucket/s3/bucket_client_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,16 @@ func (m *mockBucket) Name() string {
208208
return "mock"
209209
}
210210

211+
// IterWithAttributes mocks objstore.Bucket.IterWithAttributes()
212+
func (m *mockBucket) IterWithAttributes(ctx context.Context, dir string, f func(attrs objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
213+
return nil
214+
}
215+
216+
// SupportedIterOptions mocks objstore.Bucket.SupportedIterOptions()
217+
func (m *mockBucket) SupportedIterOptions() []objstore.IterOptionType {
218+
return nil
219+
}
220+
211221
// Iter mocks objstore.Bucket.Iter()
212222
func (m *mockBucket) Iter(ctx context.Context, dir string, f func(string) error, options ...objstore.IterOption) error {
213223
return nil

pkg/storage/bucket/sse_bucket_client.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ func (b *SSEBucketClient) getCustomS3SSEConfig() (encrypt.ServerSide, error) {
9898
return sse, nil
9999
}
100100

101+
func (b *SSEBucketClient) IterWithAttributes(ctx context.Context, dir string, f func(attrs objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
102+
return b.bucket.IterWithAttributes(ctx, dir, f, options...)
103+
}
104+
105+
func (b *SSEBucketClient) SupportedIterOptions() []objstore.IterOptionType {
106+
return b.bucket.SupportedIterOptions()
107+
}
108+
101109
// Iter implements objstore.Bucket.
102110
func (b *SSEBucketClient) Iter(ctx context.Context, dir string, f func(string) error, options ...objstore.IterOption) error {
103111
return b.bucket.Iter(ctx, dir, f, options...)

pkg/storage/tsdb/bucketindex/markers_bucket_client.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ func (b *globalMarkersBucket) Close() error {
7575
return b.parent.Close()
7676
}
7777

78+
// IterWithAttributes implements objstore.Bucket.
79+
func (b *globalMarkersBucket) IterWithAttributes(ctx context.Context, dir string, f func(attrs objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
80+
return b.parent.IterWithAttributes(ctx, dir, f, options...)
81+
}
82+
83+
// SupportedIterOptions implements objstore.Bucket.
84+
func (b *globalMarkersBucket) SupportedIterOptions() []objstore.IterOptionType {
85+
return b.parent.SupportedIterOptions()
86+
}
87+
7888
// Iter implements objstore.Bucket.
7989
func (b *globalMarkersBucket) Iter(ctx context.Context, dir string, f func(string) error, options ...objstore.IterOption) error {
8090
return b.parent.Iter(ctx, dir, f, options...)

vendor/github.com/thanos-io/objstore/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)