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

Support concurrent usage of fake pager and poller APIs #995

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

jhendrixMSFT
Copy link
Member

Create a pager/poller state machine per combination of HTTP verb and URL path so that API calls for different resources don't overlap. Bump version number in preparation for release.

Fixes the issue reported in Azure/azure-sdk-for-go#16613 (comment)

Create a pager/poller state machine per combination of HTTP verb and URL
path so that API calls for different resources don't overlap.
Bump version number in preparation for release.
Don't use the HTTP verb when stashing the state machine as it can change
for an LRO depending on the operation.
}

func (p *tracker[T]) key(req *http.Request) string {
path := req.URL.Path
Copy link
Member Author

Choose a reason for hiding this comment

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

This assumes that path will be unique per invocation. Probably always true for ARM, but is it universally true? I'm thinking perhaps a POST for the same path but with differing query parameters.

Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately we don't propagate query parameters when creating the fake poller or injecting next links for paged operations. Will fix this in the next azcore beta.

@jhendrixMSFT jhendrixMSFT merged commit d98f4ae into Azure:main Jul 18, 2023
@jhendrixMSFT jhendrixMSFT deleted the fakes_concurrency branch July 18, 2023 22:12
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