-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
S3: Support EU Bucket Location Constraint for CreateBucket
#13450
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
Conversation
Test Results (amd64) - Integration, Bootstrap 5 files ± 0 5 suites ±0 2h 32m 50s ⏱️ - 11m 25s Results for commit af2b802. ± Comparison against base commit 049201f. This pull request removes 1 and adds 18 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 1h 56m 1s ⏱️ - 9m 6s Results for commit af2b802. ± Comparison against base commit 049201f. This pull request removes 1 and adds 18 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
bca82d9 to
9d01ec9
Compare
S3 Image Test Results (AMD64 / ARM64) 2 files ± 0 2 suites ±0 8m 21s ⏱️ +8s Results for commit af2b802. ± Comparison against base commit 049201f. This pull request removes 1 and adds 9 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
bentsku
left a comment
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.
Nice work, I think storing the attribute is the right move! We get better parity this way with this weird pseudo-region, and we know we have users using this so better be good on parity!
I have some comments about us now returning the location constraint as a "None" string now in the GetBucketLocation, and we should maybe have better tests around that.
Once this is addressed, this is good to go! 🚀
9d01ec9 to
88083fe
Compare
…eaks persistence)
88083fe to
63f94da
Compare
bentsku
left a comment
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.
This looks great, thanks a lot for going the extra mile here! I believe we should keep the deleted test, and add the behavior with config.ALLOW_NONSTANDARD_REGIONS just to be on the safe side. Once this is addressed, this good to go 👍
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.
LGTM, thanks for addressing all the comments, this looks awesome! A quick fix actually was a bit more work, but ultimately the code looks much better now, thank you 🙇
Good to merge once the pipeline is all green 🚀
@bentsku All good! Thank you for the help and the reviews 🔥 |
Motivation
LocationConstraintfield to be provided with the value ofEUin the bucket configuration when creating a bucket which we don't currently support.Changes
EUwhich under the hood is just using theeu-west-1region. I imagine since it was the first EU region to be supported they just called itEUas a generic term.get_bucket_locationit will actually return the valueEUinstead ofeu-west-1but in alist_bucketsrequest the region would beeu-west-1, notEU.S3Bucketdataclass) whilst still using the correct underlying region which iseu-west-1.create_bucketandget_bucket_locationoperation to support these changes.location_constraintvariable rather than thebucket_regionget_bucket_locationXML format was updated for when there is no location constraint.us-east-1to raise an error for all invalid location constraints, not justus-east-1andaws-globalTODO
list_bucketsresponse when creating a bucket which is not currently supported in localstack (will be updated in a subsequent PR) https://docs.aws.amazon.com/AmazonS3/latest/API/API_Bucket.htmlMisc.
Resolves FLC-209