aspire: gRPC client doesn't work with Service Discovery scheme resolution syntax

The format used to support URI scheme resolution recently added to service discovery (e.g. https+http://) does not work with the gRPC client stack. The GrpcChannel class does a lot of initialization in its constructor based on the scheme of the address and special-cases https:// and http:// for numerous operations including ResolverFactory resolution and credential selection.

@JamesNK interested in your thoughts on how we might go about fixing this. I messed about a bit with a custom ResolverFactory and got further but seems we’d have to integrate more deeply to make the syntax work or update GrpcChannel to tolerate it some other way.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 1
  • Comments: 16 (11 by maintainers)

Most upvoted comments

@mikeleigh1010 yes this is exactly what this issue is about. The doc you’re pointing at is using the https+http syntax for a standard HttpClient instance, not for a gRPC client. The gRPC client does not support the https+http syntax (this issue).

@DamianEdwards Understood! We were using multi-scheme format but changed to a single scheme and it works fine. Don’t have a need for multt-scheme for the moment, thanks!

@gabynevada TBC, service discovery of the hostname/addresses does work right now, it’s just the multi-scheme format fallback feature that doesn’t work with gRPC, e.g. https+http://my-service. Do you have a specific need for that support?

What kind of feedback is needed for this? We’re using grpc for some services and would love to see a solution for service discovery.

We should consider moving this to the backlog until we get user feedback that it’s worth investigating.