-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[configgrpc] wrap gRPC client/server options in extensible interface #11069
[configgrpc] wrap gRPC client/server options in extensible interface #11069
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11069 +/- ##
==========================================
- Coverage 91.89% 91.87% -0.03%
==========================================
Files 416 416
Lines 19911 19932 +21
==========================================
+ Hits 18297 18312 +15
- Misses 1239 1243 +4
- Partials 375 377 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jade-guiton-dd for taking this on! some initial comments
I applied your suggestions, and added some clickable links in my doc comments while I was at it. Feel free to tell me if there are remaining issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you need to update the ToClientConn
used here:
if e.clientConn, err = e.config.ClientConfig.ToClientConn(ctx, host, e.settings, grpc.WithUserAgent(e.userAgent)); err != nil { |
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
@codeboten will merge this tomorrow unless you have further comments |
#11271) #### Description `ClientConfig.ToClientConn` and `ServerConfig.ToServer` were deprecated in v0.110.0 in favor of `ClientConfig.ToClientConnWithOptions` and `ServerConfig.ToServerWithOptions` which use a more flexible option type (#11069). The original functions are now removed, and the new ones are renamed to the old names. The `WithOptions` names are kept as deprecated aliases for now. Note: The "4 lines missing coverage" are from the `WithOptions` function aliases. #### Link to tracking issue Updates #9480 #### Next steps - `collector-contrib` will need to be updated to rename uses of the `WithOptions` functions - The newly deprecated aliases will then need to be removed in the next release
open-telemetry#11271) #### Description `ClientConfig.ToClientConn` and `ServerConfig.ToServer` were deprecated in v0.110.0 in favor of `ClientConfig.ToClientConnWithOptions` and `ServerConfig.ToServerWithOptions` which use a more flexible option type (open-telemetry#11069). The original functions are now removed, and the new ones are renamed to the old names. The `WithOptions` names are kept as deprecated aliases for now. Note: The "4 lines missing coverage" are from the `WithOptions` function aliases. #### Link to tracking issue Updates open-telemetry#9480 #### Next steps - `collector-contrib` will need to be updated to rename uses of the `WithOptions` functions - The newly deprecated aliases will then need to be removed in the next release
Description
To allow extending the possible option types provided to
configgrpc.ClientConfig.ToClientConn
andconfiggrpc.ServerConfig.ToServer
in the future, we want to wrap thegrpc.DialOption
andgrpc.ServerOption
parameters in more genericToClientConnOption
andToServerOption
interfaces.For compatibility, we start by adding new
ToClientConnWithOptions
andToServerWithOptions
methods, to which the now deprecatedToClientConn
andToServer
defer. A second PR will be needed to fully replace the original methods.Link to tracking issue
Fixes #9480
Testing
No tests have been added. Feel free to tell me if I should add some.
Documentation
No documentation has been added.