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
The ConfigureHttpClient method is not supported when creating gRPC clients. #4924
Comments
@martintmk can you please take a look at this? As specified above, this is a regression and breaking change, and we are preparing to lock for 8.2 release, so time is running out for fixing this. If fixing this is not trivial, I'd suggest reverting the change that introduced the regression for 8.2, and then we can check on how to better fix the original issue without causing a regression for 8.3. Thoughts? |
* Revert "Update Microsoft.Extensions.Http.Resilience to 8.2 (#2094)" This reverts commit 2bf302b. There is a breaking change with Grpc clients in this version. See dotnet/extensions#4924 * Set the EndToEnd test HttpClient timeout to infinite This allows the Http.Resilience handlers to handle the timeout correctly.
@joperezr Let's just revert that fix for 8.2.0, service owners can still disable the timeout as a workaround. Unless the restrictions around using I must say the behavior of |
+1. @JamesNK, can you clue us in on why this is restricted? |
* Revert "Update Microsoft.Extensions.Http.Resilience to 8.2 (dotnet#2094)" This reverts commit 2bf302b. There is a breaking change with Grpc clients in this version. See dotnet/extensions#4924 * Set the EndToEnd test HttpClient timeout to infinite This allows the Http.Resilience handlers to handle the timeout correctly.
Because it has no impact. It's to let the developer know that this configuration they added to the gRPC client won't do anything. builder.Services.AddGrpcClient<Greeter.GreeterClient>(o =>
{
o.Address = new Uri("https://localhost:5001/");
})
.ConfigureHttpClient(options => options.Timeout = TimeSpan.FromSeconds(10)); // no impact However, now that HttpClientFactory has the concept of applying defaults across all clients it isn't as useful. Changes would be to either add an option to gRPC client factory to suppress the error or changing the error to logging. |
@JamesNK Are there any updates to the suggestion above (suppress the error or log it)? If not, is there a ticket/item to tract it? Thank you. |
There aren't any updates. I've created an issue to track improving gRPC - grpc/grpc-dotnet#2425 I'm really busy so I'm not sure when I'll get time to look at it. |
Description
3654748 is breaking using gRPC clients with Http.Resilience. This is a breaking change from 8.1.
Reproduction Steps
greet.proto:
Expected behavior
The app should work, like it did when I use
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.2.0-preview.24105.1" />
Actual behavior
The app fails with:
Regression?
Yes, from 8.1
Known Workarounds
Don't call
AddStandardResilienceHandler()
on HttpClients that use gRPC.Configuration
net8.0
Other information
cc @martintmk @geeknoid @joperezr @JamesNK
The text was updated successfully, but these errors were encountered: