-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[WIP]external storage: use ListObjectsV2 and handle S3 express one zone #58953
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: lance6716 <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @lance6716. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (3)
br/pkg/storage/s3.go:315
- [nitpick] The variable name s3ExpressEndpointRE could be more descriptive. Consider renaming it to s3ExpressOneZoneEndpointPattern.
var s3ExpressEndpointRE = regexp.MustCompile(`s3express.*amazonaws\.com`)
br/pkg/storage/s3.go:341
- [nitpick] The error message 'must specify region for S3 Express One Zone endpoint' could be more descriptive. Consider changing it to 'Region must be specified for S3 Express One Zone endpoint'.
return nil, errors.Errorf("must specify region for S3 Express One Zone endpoint")
br/pkg/storage/s3.go:338
- Ensure that the new behavior related to S3 Express One Zone endpoints is covered by tests.
if s3ExpressEndpointRE.MatchString(qs.Endpoint) {
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #58953 +/- ##
================================================
+ Coverage 73.0285% 74.7745% +1.7460%
================================================
Files 1684 1730 +46
Lines 465663 473883 +8220
================================================
+ Hits 340067 354344 +14277
+ Misses 104691 97139 -7552
- Partials 20905 22400 +1495
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: lance6716 <[email protected]>
/ok-to-test |
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
// (Ceph RGW supported ListObjectsV2 since v15.1.0, released 2020 Jan 30th) | ||
// (as of 2020, DigitalOcean Spaces still does not support V2 - https://developers.digitalocean.com/documentation/spaces/#list-bucket-contents) | ||
res, err := rs.svc.ListObjectsWithContext(ctx, req) | ||
res, err := rs.svc.ListObjectsV2WithContext(ctx, req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what previous comment means?
does Aliyun OSS or minio support this listObjectV2? they share the same code base
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently DigitalOcean object storage server does not support this API. But now I have checked the URL, it should be supported
/hold discussing with BR team about the URL syntax of turning on S3 express one zone |
@lance6716: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: ref #58954
Problem Summary:
What changed and how does it work?
match S3 express one zone (directory bucket) endpoints using regexp. See https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-APIs.html to check regional and zonal endpoint patterns
Check List
Tests
tested with URL
s3://xxxxxxx-global-sort-test--use1-az6--x-s3/test-folder?endpoint=https://s3express-use1-az6.us-east-1.amazonaws.com®ion=us-east-1
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.