Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix s3 v3 ListObjectsV2 and ListObjectVersions pagination #9430

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

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented Oct 22, 2023

Motivation

As reported in #9427 (comment)

one thing I did notice was ListObjectsV2 startAfter appeared to be including the startAfter key, when it should be exclusive

After validating against AWS and writing some more tests which we didn't cover, we were not sorting keys properly (not leaving at the right moment in the loop).

This is based on #9429 as both are modifying the behaviour and I didn't want the merge conflict.

Changes

Fixed the behaviour to properly match AWS and wrote a good amount of tests to validate this. Took the opportunity to validate and introduce the behaviour for ListObjectVersions pagination, which is not done in moto yet but is work in progress.

@bentsku bentsku added aws:s3 Amazon Simple Storage Service semver: patch Non-breaking changes which can be included in patch releases labels Oct 22, 2023
@bentsku bentsku self-assigned this Oct 22, 2023
@bentsku bentsku requested a review from macnev2013 as a code owner October 22, 2023 02:21
@coveralls
Copy link

coveralls commented Oct 22, 2023

Coverage Status

coverage: 82.963% (+0.1%) from 82.868% when pulling 3abae13 on fix-v3-list-objects into fb929d7 on master.

Copy link
Contributor

@macnev2013 macnev2013 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. LGTM 👍🏻

Base automatically changed from fix-s3-list-encoding to master October 23, 2023 19:13
@bentsku bentsku force-pushed the fix-v3-list-objects branch from a13acf1 to 3abae13 Compare October 23, 2023 19:17
@github-actions
Copy link

LocalStack Community integration with Pro

       2 files         2 suites   1h 15m 36s ⏱️
2 267 tests 1 691 ✔️ 576 💤 0
2 268 runs  1 691 ✔️ 577 💤 0

Results for commit 3abae13.

@bentsku bentsku merged commit 28401c2 into master Oct 23, 2023
@bentsku bentsku deleted the fix-v3-list-objects branch October 23, 2023 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:s3 Amazon Simple Storage Service semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants