-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
bucket.list_blobs(max_results=n) has no effect #1467
Comments
Trying to reproduce right now. |
Confirmed: >>> list(b.list_blobs(max_results=5))
[<Blob: new1455562849552, a>,
<Blob: new1455562849552, b>,
<Blob: new1455562849552, c>,
<Blob: new1455562849552, d>,
<Blob: new1455562849552, e>,
<Blob: new1455562849552, f>] I'm hoping it's just a query string bug. Digging deeper to ascertain. |
@dhermes thanks! |
Luckily, it's our fault (not the A short term fix would be for you to use the iterator manually: response = blob_iter.get_next_page_response()
results = list(blob_iter.get_items_from_response(response)) Thanks a lot for bringing it to our attention! |
#1787 should be a reference point for a fix here |
Another example of unexpected failure: bucket = Bucket(client, 'my-bucket-name')
blobs = bucket.list_blob(
max_results=10, page_token=None, fields="items/name,nextPageToken")
for b in blobs:
print(b.name) This prints many more than 10 blobs when the iterator is exhausted. |
In the process, also making sure to lower maxResults on subsequent requests. Fixes googleapis#1467.
In the process, also making sure to lower maxResults on subsequent requests. Fixes googleapis#1467.
In the process, also making sure to lower maxResults on subsequent requests. Fixes googleapis#1467.
In the process, also making sure to lower maxResults on subsequent requests. Fixes #1467.
passing
max_results=5
tobucket.list_blobs()
appears to have no effect; all blobs are returned in theBlobIterator
The text was updated successfully, but these errors were encountered: