Skip to content
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

Fix gcs client pagination #738

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

derek-globus
Copy link
Contributor

@derek-globus derek-globus commented Jun 2, 2023

What?

  • Added marker and page_size parameters to 2 iterable gcs_client routes
    • gcs_client.get_storage_gateway_list(...)
    • gcs_client.get_role_list(...)

Why?

  • Pagination on those two routes is broken
    • As described in this ticket, iterating through gcs_client.paginated.get_storage_gateway_list() raises an unexpected keyword argument 'marker'.

Testing

Manually tested in python console:

data = gcs.paginated.get_storage_gateway_list(page_size=1)
for idx, page in enumerate(data.pages()):
    print(f"Page {idx}: {len(page['data'])} item")
    
Page 0: 1 item
Page 1: 1 item

📚 Documentation preview 📚: https://globus-sdk-python--738.org.readthedocs.build/en/738/

@derek-globus derek-globus merged commit 2fbe989 into globus:main Jun 2, 2023
@derek-globus derek-globus deleted the fix-gcs-list-pagination branch June 2, 2023 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants