-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Ensure _list_bucket uses continuation token for subsequent pages #246
Conversation
The continuation token is being captured when each page of keys is fetched, but it was not used for subsequent requests. This meant that the same page of 1000 keys would repeat forever. This commit adds a fix to ensure the continuation token is used if not None
Thank you for this PR. Does the affected test pass now? |
Co-Authored-By: tcsavage <tcsavage@gmail.com>
@mpenkov As I mentioned, I was unable to run the tests on my local machine, but I will remove the skip decorator and see if it passes in Travis. |
@@ -391,7 +391,6 @@ def test_list_bucket(self): | |||
expected = ['key_%d' % x for x in range(num_keys)] | |||
self.assertEqual(sorted(keys), sorted(expected)) | |||
|
|||
@unittest.skip('this test takes too long for some unknown reason') |
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.
LOL! Did we catch the error, but commented out its test instead of fixing? :) Who did this?
The build failed, but it looks like a problem with |
@mpenkov @piskvorky The tests pass, could we merge and release before this gets stale? |
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.
@menshikh-iv I think this is good to merge.
Thank you @tcsavage, congratz with the first contribution 🥇 |
When trying to
s3_iter_bucket
a large set of objects (more than 1000), we found we were given the same set of 1000 over and over again, forever.The issue was that the continuation token to fetch the next page, although it was being captured, was not being given to subsequent invocations of
list_objects_v2
. This pull request makes sure that if we have a continuation token, that we use it.Unfortunately, I have been unable to run the test suite but this change should fix the test "test_list_bucket_long" which is currently being skipped because it was taking "too long". Probably because it would run forever.