-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Added pagination and filtering for s3 list buckets operation #12609
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
Added pagination and filtering for s3 list buckets operation #12609
Conversation
…d integration and parity tests for this.
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
S3 Image Test Results (AMD64 / ARM64) 2 files 2 suites 8m 41s ⏱️ Results for commit 3c33f88. ♻️ This comment has been updated with latest results. |
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 1h 2m 13s ⏱️ - 40m 16s Results for commit 3c33f88. ± Comparison against base commit b961fee. This pull request removes 2630 and adds 5 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
…f string comparisons when listing a bucket
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.
Awesome, great work, this is a nice addition!
I have a few comments, one blocking regarding the snapshot transformations of fields that are changing between every runs.
There's also a case that seems to be missing: when the continuation token provided is an empty string.
Once these are addressed, we're good to go 🚀 nice work!
if continuation_token == "": | ||
raise InvalidArgument( | ||
"The continuation token provided is incorrect", | ||
ArgumentName="continuation-token", | ||
) |
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.
it seems we do not have a snapshot test covering this, it would be great to add a snapshot validated test for it
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.
I have checked what AWS does with this empty continuation token scenario and it turns out that it allows it instead of throwing an error. Thus, I have removed this raise error code block and created a test to validate that this implementation accepts and ignores an empty continuation token. Let me know what you think about it
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.
@bentsku is this fine for you? Do you agree?
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 is good, thanks for checking this! 👍
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.
Thanks for addressing the comments! This looks good 👌 I've answered the BucketRegion
negative case question, and after that we should be good to go!
Seems like the test failures are unrelated, and linked to the Transcribe service?
Yea, no idea at all why those unrelated tests are failing :( |
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! This is great, thanks for taking the time to address the comments, this looks awesome! 💯
Also, thank you for taking the time to properly transform the region field, making sure the tests are always passing even with non-default regions.
Let's ship it!
snapshot.match("list-objects-with-empty-continuation-token", response) | ||
|
||
@markers.aws.validated | ||
# In some regions AWS returns the Owner display name (us-west-2) but in some it doesnt (eu-central-1) |
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 comment, thanks for adding it! 👌
Motivation
Right now, the list buckets operation is ignoring the
Prefix
,MaxBuckets
,BucketRegion
andContinuationToken
which results in the operation always returning all buckets.Closes #12585
Changes
Prefix
,MaxBuckets
,BucketRegion
andContinuationToken
to filter and paginate accordingly.