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 the URI param for next token in azure_storage_blobs find_blobs_by_tags #1253

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

hiepqdinh
Copy link
Contributor

@hiepqdinh hiepqdinh commented Mar 30, 2023

The next (continuation) token for find_blobs_by_tags is currently set to the next URI param when pagination happens. However, according to Azure documentation https://learn.microsoft.com/en-us/rest/api/storageservices/find-blobs-by-tags?tabs=azure-ad the continuation token should be set on the marker URI param. Other part of the library is also using marker URI param, except for this particular operation.

Because of this incorrect URI param name, when this function is called with more than 5000 results (the upper cap on the result of a single call), the Pageable logic will kick in, and fetch the next page using this token. However, since the API server doesn't see a marker value, it will still return that first 5000 results. Which means a user looping through the call would get into an infinite loop.

This PR fixes this issue by switching to use the existing append_to_url_query function on NextMarker to do the job.

@hiepqdinh hiepqdinh marked this pull request as ready for review March 30, 2023 04:03
@hiepqdinh hiepqdinh changed the title Fix the URI param for next token in find_blobs_by_tags Fix the URI param for next token in azure_storage_blobs find_blobs_by_tags Mar 30, 2023
@demoray demoray merged commit 455c4ff into Azure:main Mar 30, 2023
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.

None yet

2 participants