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

Fix client factory extension method validation issues #2159

Merged

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Jun 13, 2023

Fixes #2158

  • Extension methods now work when AddGrpcClient is called without configuration
  • Extension methods now report the failing method name correctly (I made it explicit instead of an attribute to avoid someone unknowingly accidentally regressing the error name)

@JamesNK
Copy link
Member Author

JamesNK commented Jun 13, 2023

FYI @jviau

You can temporarily work around the issue by using an AddGrpcClient overload that includes a configuration parameter and provide an empty one.

Copy link

@jviau jviau left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix! And yes, I am using the .AddGrpcClient(_ => { }) for now.

Copy link
Contributor

@mgravell mgravell left a comment

Choose a reason for hiding this comment

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

approved with one optional suggestion

edit: I just noticed the "(I made it explicit instead of an attribute to avoid someone unknowingly accidentally regressing the error name)" (sorry, words are hard!) - noted, so: you considered it, dismissed it, and gave a reason; fine

@JamesNK JamesNK merged commit 73c726b into grpc:master Jun 14, 2023
@JamesNK JamesNK deleted the jamesnk/clientfactory-extension-validation branch June 14, 2023 11:52
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.

InvalidOperationException when configuring gRPC client (Grpc.Net.ClientFactory)
3 participants