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

[Internal] Add transport to handle request routing #16221

Merged
merged 13 commits into from
Nov 30, 2021

Conversation

seankane-msft
Copy link
Member

@seankane-msft seankane-msft commented Nov 18, 2021

Closes #16217

Currently users have to use a custom policy and a custom transport. This replaces the custom policy and makes only a custom transport necessary. The new transport uses uses the internal recording.ReplaceAuthority method to route requests. In the future this will limit the amount of code needed in each library and remove some of the calls to the recording module.

I will go through updating libraries already using the policy and GetHTTPClient method in a future PR

@seankane-msft seankane-msft self-assigned this Nov 18, 2021
@seankane-msft seankane-msft marked this pull request as draft November 18, 2021 22:08
@seankane-msft seankane-msft changed the title Update transport [Internal] Add transport to handle request routing Nov 18, 2021
@seankane-msft seankane-msft marked this pull request as ready for review November 18, 2021 22:37
Copy link
Member

@richardpark-msft richardpark-msft left a comment

Choose a reason for hiding this comment

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

Curious if the recordings file should be checked in, and maybe a name change depending on what your intention was.

Copy link
Member

@richardpark-msft richardpark-msft left a comment

Choose a reason for hiding this comment

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

Looks good!

@seankane-msft seankane-msft merged commit 6b9cfae into Azure:main Nov 30, 2021
@seankane-msft seankane-msft deleted the update-transport branch November 30, 2021 18:01
jhendrixMSFT pushed a commit to jhendrixMSFT/azure-sdk-for-go that referenced this pull request Jan 12, 2022
* added basic client for routing

* using simplifed single client

* removing policy code

* adding test to ensure routing client works same as original client

* adding changelog entry and changing struct name

* undoing tables changes

* improving test, changing name

* updating changelog

* setting recordMode variable instead of env var

* adding issue number to changelog entries

* updating date for release
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.

[Internal] Investigate whether custom Transport can replace policy and transport
2 participants