Minor GRPC cleanups#2646
Closed
cyli wants to merge 3 commits intomoby:masterfrom
Closed
Conversation
Signed-off-by: Ying Li <ying.li@docker.com>
…gger to discard in test init functions, rather than in TestMain functions as is documented by the `SetLoggerV2` function. Also, use `SetLoggerV2` since SetLogger is deprecated. Signed-off-by: Ying Li <ying.li@docker.com>
entry into a grpc LoggerV2, since the grpc Logger is deprecated. Signed-off-by: Ying Li <ying.li@docker.com>
Codecov Report
@@ Coverage Diff @@
## master #2646 +/- ##
==========================================
- Coverage 61.85% 61.81% -0.05%
==========================================
Files 134 134
Lines 21823 21826 +3
==========================================
- Hits 13499 13491 -8
- Misses 6869 6893 +24
+ Partials 1455 1442 -13 |
Merged
Contributor
Author
|
Will just close this in favor of #2649 since that includes these changes anyway. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR does 4 things:
Our
MutableTLSCreds.Clonefunction creates a newMutableTLSCredsobject with the TLS config, which should not be re-used. Previously, GRPC never called clone on the creds, but in 1.10.x, it does. Our code should just calltls.Config'sClonefunction anyway, because we should not be passing the same config object to multiple connections. This should fix some issues with [WIP] Update grpc etc #2631.Our tests call
grpclog.SetLoggerinTestMainfunctions sometimes - the docs say that it should be set only ininitfunctions. Calling it inTestMaincan cause races. This should fix some issues with [WIP] Update grpc etc #2631.Stops using
grpclog.SetLogger, which is deprecated, and callsgrpc.SetLoggerV2instead. This required converting alogrus.Entryinto something that satisfies thegrpclog.LoggerV2interface. I just did this since I was messing around with the logger anyway for the tests.Deletes some extra code in
role_manager_test.gothat didn't seem to be called from anywhere.cc @thaJeztah