Skip to content

Commit

Permalink
Added a "Known issues" section describing a potential issue with Grpc…
Browse files Browse the repository at this point in the history
….Net.ClientFactory library (#42476)

* Adds a "Known issues" section describing potential issue described here dotnet/extensions#4924

* Apply suggestions from code review

---------

Co-authored-by: David Pine <[email protected]>
  • Loading branch information
iliar-turdushev and IEvangelist committed Sep 6, 2024
1 parent ee1b536 commit fe96781
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/core/resilience/http-resilience.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,33 @@ The preceding diagram depicts:
- If the response is unsuccessful (HTTP non-200), the resilience pipeline employs the configured resilience strategies.

While this is a simple example, it demonstrates how the resilience strategies can be used to handle transient errors. For more information, see [Polly docs: Strategies](https://www.pollydocs.org/strategies).

## Known issues

The following sections detail various known issues.

### Compatibility with the `Grpc.Net.ClientFactory` package

If you're using `Grpc.Net.ClientFactory` version `2.63.0` or earlier, then enabling the standard resilience or hedging handlers for a gRPC client could cause a runtime exception. Specifically, consider the following code sample:

```csharp
services
.AddGrpcClient<Greeter.GreeterClient>()
.AddStandardResilienceHandler();
```

The preceding code results in the following exception:

```Output
System.InvalidOperationException: The ConfigureHttpClient method is not supported when creating gRPC clients. Unable to create client with name 'GreeterClient'.
```

To resolve this issue, we recommend upgrading to `Grpc.Net.ClientFactory` version `2.64.0` or later.

There's a build time check that verifies if you're using `Grpc.Net.ClientFactory` version `2.63.0` or earlier, and if you are the check produces a compilation warning. You can suppress the warning by setting the following property in your project file:

```xml
<PropertyGroup>
<SuppressCheckGrpcNetClientFactoryVersion>true</SuppressCheckGrpcNetClientFactoryVersion>
</PropertyGroup>
```

0 comments on commit fe96781

Please sign in to comment.