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

pkg/templates: Use *policy.ClientOptions #4198

Closed

Conversation

ellismg
Copy link
Member

@ellismg ellismg commented Aug 9, 2024

Instead of taking a httputil.HttpClient (which at runtime is just an *http.Client) and forming a *policy.ClientOptions ourselves, let's just take in a *policy.ClientOptions as an Azure SDK client would. Functionaly the change here means these calls will start using our centralized *policy.ClientOptions which includes this like adding tracing headers and a user-agent header for the REST calls we make, just like any client from the Azure SDKs.

Copy link
Member

@vhvb1989 vhvb1989 left a comment

Choose a reason for hiding this comment

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

It's always fun to see and read this:

image

@ellismg ellismg enabled auto-merge (squash) August 9, 2024 20:17
Instead of taking a `httputil.HttpClient` (which at runtime is just an
`*http.Client`) and forming a `*policy.ClientOptions` ourselves, let's
just take in a `*policy.ClientOptions` as an Azure SDK client
would. Functionaly the change here means these calls will start using
our centralized `*policy.ClientOptions` which includes this like
adding tracing headers and a user-agent header for the REST calls we
make, just like any client from the Azure SDKs.
@ellismg ellismg force-pushed the ellismg/use-injected-client-options branch from 28f3c9c to 6f23714 Compare August 28, 2024 21:26
@ellismg
Copy link
Member Author

ellismg commented Oct 14, 2024

Doing this leads to some weird issues in an end to end test, I assume because more initialization code ends up running "earlier" in the process than we intended (via our IoC resolvers, I assume). I'm going to close this for now until I have some time to dig in and better understand what is causing this difference.

@ellismg ellismg closed this Oct 14, 2024
auto-merge was automatically disabled October 14, 2024 17:23

Pull request was closed

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.

3 participants