-
Notifications
You must be signed in to change notification settings - Fork 620
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
Bumps GRPC to 1.12.0 #2649
Bumps GRPC to 1.12.0 #2649
Conversation
Oops, looks like one more issue. --- FAIL: TestStreamRaftMessage (0.55s) Error Trace: raft_test.go:978 Error: An error is expected but got nil. Messages: Received unexpected error EOF 2018-05-25 18:57:11.557227 E | snap: failed to remove broken snapshot file /tmpfs/TestRaftEncryptionKeyRotationWait889009686/snap-v3-encrypted/0000000000000003-0000000000000008.snap 2018-05-25 18:57:11.809242 E | snap: failed to remove broken snapshot file /tmpfs/TestRaftEncryptionKeyRotationWait889009686/snap-v3-encrypted/0000000000000003-0000000000000009.snap 2018-05-25 18:57:12.353853 I | wal: segmented wal file /tmpfs/TestGCWAL627798653/wal-v3-encrypted/0000000000000001-000000000000000d.wal is created 2018-05-25 18:57:12.365181 I | wal: segmented wal file /tmpfs/TestGCWAL142803895/wal-v3-encrypted/0000000000000001-000000000000000d.wal is created 2018-05-25 18:57:12.376396 I | wal: segmented wal file /tmpfs/TestGCWAL383336376/wal-v3-encrypted/0000000000000001-000000000000000d.wal is created 2018-05-25 18:57:12.968345 I | wal: segmented wal file /tmpfs/TestGCWAL997199274/wal-v3-encrypted/0000000000000001-000000000000000d.wal is created 2018-05-25 18:57:12.987945 I | wal: segmented wal file /tmpfs/TestGCWAL009475841/wal-v3-encrypted/0000000000000001-000000000000000d.wal is created 2018-05-25 18:57:12.989433 I | wal: segmented wal file /tmpfs/TestGCWAL207767148/wal-v3-encrypted/0000000000000001-000000000000000d.wal is created FAIL I didn't change raft, so possibly something else in GRPC changed. |
Codecov Report
@@ Coverage Diff @@
## master #2649 +/- ##
=========================================
+ Coverage 61.85% 62.2% +0.34%
=========================================
Files 134 134
Lines 21823 21739 -84
=========================================
+ Hits 13499 13522 +23
+ Misses 6869 6759 -110
- Partials 1455 1458 +3 |
and it's green! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Perhaps some squashing is needed on the code changes ?
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>
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>
…r that can surface TLS handshake errors, which GRPC considers transient. Signed-off-by: Ying Li <ying.li@docker.com>
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>
@anshulpundir There are a couple I'd like to leave separate in case we need to revert any of these. The changes that I think should work regardless of GRPC version are squashed and up top.
|
manager/state/raft/raft_test.go
Outdated
@@ -975,7 +975,7 @@ func TestStreamRaftMessage(t *testing.T) { | |||
|
|||
raftMsg := &api.StreamRaftMessageRequest{Message: msg} | |||
err = stream.Send(raftMsg) | |||
assert.Error(t, err, "Received unexpected error EOF") | |||
assert.NoError(t, err, "Received unexpected error EOF") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the "Received unexpected error EOF"
should be removed here?
i.e., just
assert.NoError(t, err)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry, I yes, thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
no longer returns an EOF. Signed-off-by: Ying Li <ying.li@docker.com>
Signed-off-by: Ying Li <ying.li@docker.com>
cc @tonistiigi - Apologies for bothering you, but you were pinged for review on #797. I was wondering if you remembered enough about that to review this change: 90418ad? #2 in my comment up above. |
@cyli Yes, there shouldn't be a need for that transport close. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!!
LGTM, let's ship it. |
Supercedes #2631 by bumping GRPC to 1.12.0.
This includes a bunch of fixes to our code to address breaking API changes, namely:
WithBlock()
, so the tests need to change.transport.StreamFromContext
has been removed, so our raft proxy and dispatcher can no longer use that API.transport
is intended to be an internal package to GRPC anyway, so in general I think we aren't intended to use/manipulate the transports anyway.This is based on #2646.