Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

lance6716
Copy link
Contributor

@lance6716 lance6716 commented Jan 15, 2025

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

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

tested with URL s3://xxxxxxx-global-sort-test--use1-az6--x-s3/test-folder?endpoint=https://s3express-use1-az6.us-east-1.amazonaws.com&region=us-east-1

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 15, 2025
Copy link

ti-chi-bot bot commented Jan 15, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from lance6716, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

tiprow bot commented Jan 15, 2025

Hi @lance6716. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

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.

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) {
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 53.84615% with 6 lines in your changes missing coverage. Please review.

Project coverage is 74.7745%. Comparing base (36e8e34) to head (5bc83d3).
Report is 1 commits behind head on master.

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     
Flag Coverage Δ
integration 48.6047% <30.7692%> (?)
unit 72.1997% <53.8461%> (-0.0121%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 60.2414% <53.8461%> (+15.0094%) ⬆️

Signed-off-by: lance6716 <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 15, 2025
@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Jan 16, 2025
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 17, 2025
// (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)
Copy link
Contributor

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

Copy link
Contributor Author

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

@lance6716
Copy link
Contributor Author

/hold

discussing with BR team about the URL syntax of turning on S3 express one zone

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 17, 2025
@lance6716 lance6716 changed the title external storage: use ListObjectsV2 and handle S3 express one zone [WIP]external storage: use ListObjectsV2 and handle S3 express one zone Jan 17, 2025
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 17, 2025
Copy link

ti-chi-bot bot commented Jan 17, 2025

@lance6716: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-br-integration-test 5bc83d3 link true /test pull-br-integration-test

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants