This repository was archived by the owner on Sep 26, 2023. It is now read-only.
Add setAttemptDirectPath(boolean) for InstantiatingGrpcChannelProvider.Builder #1015
Merged
chingor13 merged 5 commits intogoogleapis:masterfrom May 28, 2020
Merged
Add setAttemptDirectPath(boolean) for InstantiatingGrpcChannelProvider.Builder #1015chingor13 merged 5 commits intogoogleapis:masterfrom
chingor13 merged 5 commits intogoogleapis:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1015 +/- ##
============================================
+ Coverage 78.66% 78.72% +0.05%
- Complexity 1167 1169 +2
============================================
Files 204 204
Lines 5152 5184 +32
Branches 413 416 +3
============================================
+ Hits 4053 4081 +28
- Misses 925 928 +3
- Partials 174 175 +1
Continue to review full report at Codecov.
|
igorbernstein2
suggested changes
Apr 7, 2020
| // TODO(weiranf): Add API in ComputeEngineCredentials to check default service account. | ||
| // TODO(weiranf): Remove isDirectPathEnvVarEnabled once setAttemptDirectPath is adapted and the | ||
| // env var is removed from client environment. | ||
| if ((attemptDirectPath | isDirectPathEnvVarEnabled(serviceAddress)) |
Contributor
There was a problem hiding this comment.
Please use ||
I think attemptDirectPath should be tristated:
- unset: use env var
- true: enable direct path
- false: disable direct path
Contributor
Author
There was a problem hiding this comment.
Nice catch! not sure what I was thinking..
igorbernstein2
approved these changes
May 27, 2020
Contributor
igorbernstein2
left a comment
There was a problem hiding this comment.
LGTM, but might be good to have someone from the gax team approve as well
Contributor
Author
|
Adding @chingor13. Jeff can you take a look at this PR? Thanks! |
chingor13
approved these changes
May 27, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current logic for deciding whether or not to attempt DirectPath is by checking the environment variable
GOOGLE_CLOUD_ENABLE_DIRECT_PATH. However, we have decided to remove the dependency on this env variable and instead we should allow Yoshi library to attempt DirectPath by default.Added
setAttemptDirectPath()so that Yoshi client library can use this API to set whether the client uses the DirectPath code path by default. The default value for attemptDirectPath is false.+cc @igorbernstein2