-
Notifications
You must be signed in to change notification settings - Fork 621
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
[WIP][18.03 backport] dependency changes for newer Go versions #2881
[WIP][18.03 backport] dependency changes for newer Go versions #2881
Conversation
thaJeztah
commented
Aug 19, 2019
•
edited
Loading
edited
- Log GRPC server errors #2541 Log GRPC server errors
- to get a cleaner cherry-pick
- Don't use wrappers for grpc metadata #2610 Don't use wrappers for grpc metadata
- vendor: update gRPC, protobuf #2452 vendor: update gRPC, protobuf
- (skipped) Bump CFSSL #2644 Bump CFSSL
- Bumps GRPC to 1.12.0 #2649 Bumps GRPC to 1.12.0
Changes the grpc unary and stream interceptors to implement logging of errors returned by RPCs (while also letting the prometheus interceptors do their thing). The biggest motivation for this change is that if a client times out while a grpc method is happening, the client may not ever get an error from the server, but the server should hopefully log an error explaining why it couldn't handle the request (like what part it may have been blocked on). Signed-off-by: Drew Erny <[email protected]> (cherry picked from commit cb3b9a7) Signed-off-by: Sebastiaan van Stijn <[email protected]>
More changes needed;
|
Looks like we need #2649 after all 😓 |
This switches the current usage of NewContext and FromContext to use the underlying methods in the metadata package. This will be removed in future versions of grpc. Signed-off-by: Michael Crosby <[email protected]> (cherry picked from commit 7bbda7c) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 59f5b65) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 61c4bd2) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 58cea3d) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Fixes an issue resulting from string matching the error result of grpc methods. Adds comments documenting the fix, as well as explaining how to avoid this issue in the future. Also updates manager/manager.go to use the function MaxRecvMsgSize, instead of the deprecated equivalent MaxMsgSize. Signed-off-by: Drew Erny <[email protected]> Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 8a2b6fd) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1. We now call `Clone` on the tls config when cloning the MutableTLSConfig because you can't reuse a tls.Config for multiple connections, which we would be doing if something called MutableTLSCreds.Clone, which newer versions of GRPC do. 2. To prevent data races when grpc attempts to log, only set the grpc logger 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. 3. Wrap the default logger in a private struct that converts a logrus entry into a grpc LoggerV2, since the grpc Logger is deprecated. 4. Stop using transport.StreamFromContext to get the peer address when checking redirects in the raft proxy. grpc/transport is an internal package that downstream should not depend on, as the API may change (StreamFromContext for example is removed in >=1.11). peer.FromContext can get the peer address just as well. Signed-off-by: Ying Li <[email protected]> (cherry picked from commit f1afeb1) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1. The GRPC update stopped returning errors when the listener underlying a GRPC server closed, so remove that assertion from the tests. 2. Change the first error tracking in node not to check the GRPC error type for x509 errors, since it's changed between GRPC <1.10 and >=1.10, and the error message has changed as well in >=1.11. Also change the error message checking to something that works in <1.10 as well as >=1.11. Signed-off-by: Ying Li <[email protected]> (cherry picked from commit 4343384) Signed-off-by: Sebastiaan van Stijn <[email protected]>
…r that can surface TLS handshake errors, which GRPC considers transient. Signed-off-by: Ying Li <[email protected]> (cherry picked from commit 6a6993f) Signed-off-by: Sebastiaan van Stijn <[email protected]>
to reconnect. Just return an error - if an error is returned, the agent will reconnect anyway - it seems like the transport closing was a way to convince GRPC's load balancer to start reconnecting automatically. See moby#797. Signed-off-by: Ying Li <[email protected]> (cherry picked from commit 90418ad) Signed-off-by: Sebastiaan van Stijn <[email protected]>
no longer returns an EOF. Signed-off-by: Ying Li <[email protected]> (cherry picked from commit e54ad63) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Ying Li <[email protected]> (cherry picked from commit 8f58755) Signed-off-by: Sebastiaan van Stijn <[email protected]>
9d4808c
to
dbee359
Compare
Vendor check failing
|
Perhaps needs #2283 added (reverted) |
Signed-off-by: Drew Erny <[email protected]>
@thaJeztah I reran vndr and |
Ah, whoops; I don't think we need this; after some discussion, updating all of these dependencies was only needed for a small change in one dependency; changing that dependency caused a huge ripple effect to other dependencies. For now, we resolved that by forking cfssl and backporting google/certificate-transparency-go#286 I'll close this, but keep the branch for now, in case we need to revisit that decision 🤗 |