-
Notifications
You must be signed in to change notification settings - Fork 53
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: Move direct path misconfiguration log to before creating the first channel #2430
Conversation
Thoughts on adding test which creates a InstantiatingGrpcChannelProvider, changes a property in the builder with it still misconfigured, and recreates it? Essentially runs Might be beneficial so we don't accidentally refactor |
Thanks! Added a test case that calling builder should not log anything. |
Quality Gate passed for 'gapic-generator-java-root'Kudos, no new issues were introduced! 0 New issues |
Quality Gate passed for 'java_showcase_integration_tests'Kudos, no new issues were introduced! 0 New issues |
Fixes #2423
The root cause of the issue is that
logDirectPathMisconfig()
is called in the builder ofInstantiatingGrpcChannelProvider
, which could be called multiple times before it is fully instantiated. We should only calllogDirectPathMisconfig()
right beforecreateChannel()
which creates the first channel.We can not move it to before
createSingleChannel()
because it is used for resizing channel regularly after a client is initialized, and we only want to log direct path misconfiguration once.