-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cosmos: Resolve HttpClientFactory from DI if available #21274
Comments
Yes, please. I was coming here to say how much I needed this. Our use case is simple: when testing locally, we're in Docker. We fight all these blasted SSL cert issues with the Azure Cosmos DB Emulator that's hosted in Windows (the host). Version 3.12.0 of the SDK finally gave us the ability to circumvent that. However, EF Core is blocking us from going in that direction. However, we won't be necessarily registering the |
@ajcvickers : I just got to look briefly at the CosmosDB Provider for EF Core 5 today and can already tell that it's so much better. Thank you. Is there any way that in a near future release (pre 6.0), you can give us something in the |
@DaleyKD There won't be any GA/RTM release of EF Core before EF Core 6.0. You could consider using the daily builds or previews, which are generally very stable. We are considering fixing this for 6.0, or it may be fixed by a community PR, and the quickest ways to get that fix are going to be daily builds followed by previews. |
@davidfowl @pranavkm @mkArtakMSFT From an ASP.NET perspective, should an application try to use the HttpClientFactory that is configured by ASP.NET to also access Cosmos? Or should a separate factory be used? Or does it not matter? |
Keep it separate, you don't know how the HttpClient is configured and its possible you don't want a poorly configured HttpClient to mess with cosmos? Do users ever need to set client settings for cosmos? |
The main reason for me to be able to configure the HttpClient, is to disable SSL verification for tests I run in the CI pipeline. Since this is not (visible) on the roadmap for EFCore 6, would it help if I create a PR for it where I add a |
@dnperfors You can try, the deadline for merging 6.0 features is August 15. Since this is a Because of this it's important to never instantiate |
@dnperfors : If you could get this to happen ASAP, that'd be glorious. I loathe using the Windows Cosmos DB Emulator solely because of the hassle I go thru to create SSL certs to then load into my Linux Docker container and hope it works. If I could just bypass the SSL validation for local dev, I'd be decently more efficient. |
@DaleyKD I am working on it, just need to test it some more and tidy up enforce creating the PR. I hope to get the change to finish it tonight or tomorrow. |
Hey @dnperfors thanks for your contributing to the Cosmos DB provider. I'd like to send you a Cosmos DB drink coaster and a sticker. If you could DM me on Twitter @markjbrown and send me your address, I'll get those shipped out to you. Thanks again. |
https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosclientoptions.httpclientfactory
The text was updated successfully, but these errors were encountered: