Skip to content

Commit

Permalink
update objstore to revert thanos-io/objstore#148 (#6297)
Browse files Browse the repository at this point in the history
* update objstore to revert thanos-io/objstore#148

Signed-off-by: Ben Ye <[email protected]>

* fix bucket client due to signature change

Signed-off-by: Ben Ye <[email protected]>

---------

Signed-off-by: Ben Ye <[email protected]>
  • Loading branch information
yeya24 authored Oct 31, 2024
1 parent 00c7b68 commit ee87dff
Show file tree
Hide file tree
Showing 18 changed files with 91 additions and 69 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ require (
github.com/sony/gobreaker v1.0.0
github.com/spf13/afero v1.11.0
github.com/stretchr/testify v1.9.0
github.com/thanos-io/objstore v0.0.0-20240913074259-63feed0da069
github.com/thanos-io/objstore v0.0.0-20241010161353-f90c89a0ef90
github.com/thanos-io/promql-engine v0.0.0-20240921092401-37747eddbd31
github.com/thanos-io/thanos v0.35.2-0.20241029125830-62038110b1bc
github.com/uber/jaeger-client-go v2.30.0+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1686,8 +1686,8 @@ 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-20240913074259-63feed0da069 h1:TUPZ6euAh8I62KrpDnBIg7k2C5HjgXQnVHoUUMacGwM=
github.com/thanos-io/objstore v0.0.0-20240913074259-63feed0da069/go.mod h1:Cba80S8NbVBBdyZKzra7San/jXvpAxArbpFymWzIZhg=
github.com/thanos-io/objstore v0.0.0-20241010161353-f90c89a0ef90 h1:+gDIM0kLg4mpwU4RjvG09KiZsPrCy9EBHf8J/uJ+Ve0=
github.com/thanos-io/objstore v0.0.0-20241010161353-f90c89a0ef90/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.20241029125830-62038110b1bc h1:AoIDFFb3xjED+mmf5g6bnULDgNJWeXtKyjAQ1CKtqfk=
Expand Down
6 changes: 3 additions & 3 deletions integration/alertmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func TestAlertmanagerClustering(t *testing.T) {
Bucket: alertsBucketName,
AccessKey: e2edb.MinioAccessKey,
SecretKey: e2edb.MinioSecretKey,
}, "alertmanager-test")
}, "alertmanager-test", nil)
require.NoError(t, err)

// Create and upload an Alertmanager configuration.
Expand Down Expand Up @@ -219,7 +219,7 @@ func TestAlertmanagerSharding(t *testing.T) {
Bucket: alertsBucketName,
AccessKey: e2edb.MinioAccessKey,
SecretKey: e2edb.MinioSecretKey,
}, "alertmanager-test")
}, "alertmanager-test", nil)
require.NoError(t, err)

// Create and upload Alertmanager configurations.
Expand Down Expand Up @@ -537,7 +537,7 @@ func TestAlertmanagerShardingScaling(t *testing.T) {
Bucket: alertsBucketName,
AccessKey: e2edb.MinioAccessKey,
SecretKey: e2edb.MinioSecretKey,
}, "alertmanager-test")
}, "alertmanager-test", nil)
require.NoError(t, err)

// Create and upload Alertmanager configurations.
Expand Down
6 changes: 3 additions & 3 deletions integration/e2e/scenario_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func testMinioWorking(t *testing.T, m *e2e.HTTPService) {
})
require.NoError(t, err)

bkt, err := s3.NewBucket(log.NewNopLogger(), b, "test")
bkt, err := s3.NewBucket(log.NewNopLogger(), b, "test", nil)
require.NoError(t, err)

require.NoError(t, bkt.Upload(ctx, "recipe", bytes.NewReader([]byte("Just go to Pastry Shop and buy."))))
Expand Down Expand Up @@ -116,7 +116,7 @@ func TestScenario(t *testing.T) {
SecretKey: e2edb.MinioSecretKey,
})
require.NoError(t, err)
bkt, err := s3.NewBucket(log.NewNopLogger(), b, "test")
bkt, err := s3.NewBucket(log.NewNopLogger(), b, "test", nil)
require.NoError(t, err)

_, err = bkt.Get(context.Background(), "recipe")
Expand All @@ -140,7 +140,7 @@ func TestScenario(t *testing.T) {
SecretKey: e2edb.MinioSecretKey,
})
require.NoError(t, err)
bkt, err = s3.NewBucket(log.NewNopLogger(), b, "test")
bkt, err = s3.NewBucket(log.NewNopLogger(), b, "test", nil)
require.NoError(t, err)

_, err = bkt.Get(context.Background(), "recipe")
Expand Down
2 changes: 1 addition & 1 deletion integration/query_frontend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ func TestQueryFrontendQueryRejection(t *testing.T) {
Bucket: bucketName,
AccessKey: e2edb.MinioAccessKey,
SecretKey: e2edb.MinioSecretKey,
}, "runtime-config-test")
}, "runtime-config-test", nil)

require.NoError(t, err)

Expand Down
2 changes: 1 addition & 1 deletion integration/ruler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ func TestRulerDisablesRuleGroups(t *testing.T) {
Bucket: bucketName,
AccessKey: e2edb.MinioAccessKey,
SecretKey: e2edb.MinioSecretKey,
}, "runtime-config-test")
}, "runtime-config-test", nil)

require.NoError(t, err)

Expand Down
2 changes: 1 addition & 1 deletion integration/runtime_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func TestLoadRuntimeConfigFromCloudStorage(t *testing.T) {
Bucket: bucketName,
AccessKey: e2edb.MinioAccessKey,
SecretKey: e2edb.MinioSecretKey,
}, "runtime-config-test")
}, "runtime-config-test", nil)
require.NoError(t, err)

content, err := os.ReadFile(filepath.Join(getCortexProjectDir(), "docs/configuration/runtime-config.yaml"))
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/bucket/azure/bucket_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ func NewBucketClient(cfg Config, name string, logger log.Logger) (objstore.Bucke
return nil, err
}

return azure.NewBucket(logger, serialized, name)
return azure.NewBucket(logger, serialized, name, nil)
}
2 changes: 1 addition & 1 deletion pkg/storage/bucket/gcs/bucket_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ func NewBucketClient(ctx context.Context, cfg Config, name string, logger log.Lo
return nil, err
}

return gcs.NewBucket(ctx, logger, serialized, name)
return gcs.NewBucket(ctx, logger, serialized, name, nil)
}
4 changes: 2 additions & 2 deletions pkg/storage/bucket/s3/bucket_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewBucketClient(cfg Config, name string, logger log.Logger) (objstore.Bucke
return nil, err
}

bucket, err := s3.NewBucketWithConfig(logger, s3Cfg, name)
bucket, err := s3.NewBucketWithConfig(logger, s3Cfg, name, nil)
if err != nil {
return nil, err
}
Expand All @@ -47,7 +47,7 @@ func NewBucketReaderClient(cfg Config, name string, logger log.Logger) (objstore
return nil, err
}

bucket, err := s3.NewBucketWithConfig(logger, s3Cfg, name)
bucket, err := s3.NewBucketWithConfig(logger, s3Cfg, name, nil)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/bucket/swift/bucket_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ func NewBucketClient(cfg Config, _ string, logger log.Logger) (objstore.Bucket,
return nil, err
}

return swift.NewContainer(logger, serialized)
return swift.NewContainer(logger, serialized, nil)
}
1 change: 1 addition & 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.

12 changes: 8 additions & 4 deletions vendor/github.com/thanos-io/objstore/providers/azure/azure.go

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

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

29 changes: 16 additions & 13 deletions vendor/github.com/thanos-io/objstore/providers/gcs/gcs.go

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

44 changes: 27 additions & 17 deletions vendor/github.com/thanos-io/objstore/providers/s3/s3.go

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

Loading

0 comments on commit ee87dff

Please sign in to comment.