[WIP][18.03 backport] dependency changes for newer Go versions#2881
Closed
thaJeztah wants to merge 13 commits intomoby:bump_v18.03from
Closed
[WIP][18.03 backport] dependency changes for newer Go versions#2881thaJeztah wants to merge 13 commits intomoby:bump_v18.03from
thaJeztah wants to merge 13 commits intomoby:bump_v18.03from
Conversation
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 <drew.erny@docker.com> (cherry picked from commit cb3b9a7) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Member
Author
|
More changes needed; |
Member
Author
|
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 <crosbymichael@gmail.com> (cherry picked from commit 7bbda7c) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 59f5b65) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 61c4bd2) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 58cea3d) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 <drew.erny@docker.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 8a2b6fd) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 <ying.li@docker.com> (cherry picked from commit f1afeb1) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 <ying.li@docker.com> (cherry picked from commit 4343384) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…r that can surface TLS handshake errors, which GRPC considers transient. Signed-off-by: Ying Li <ying.li@docker.com> (cherry picked from commit 6a6993f) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 <ying.li@docker.com> (cherry picked from commit 90418ad) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
no longer returns an EOF. Signed-off-by: Ying Li <ying.li@docker.com> (cherry picked from commit e54ad63) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Ying Li <ying.li@docker.com> (cherry picked from commit 8f58755) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
9d4808c to
dbee359
Compare
Member
Author
|
Vendor check failing Details |
Member
Author
|
Perhaps needs #2283 added (reverted) |
Signed-off-by: Drew Erny <drew.erny@docker.com>
Collaborator
|
@thaJeztah I reran vndr and |
Member
Author
|
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 🤗 |
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.
Uh oh!
There was an error while loading. Please reload this page.