-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix(transport): Correctly map hyper errors #629
Conversation
I'm curious what the underlying error is actually causing what you're seeing. Its most likely We already map
|
That's fair. Let me see if I can come up with a clear test case to demonstrate what I was seeing. |
#612 potentially related where GOAWAY would cause new streams to fail with a |
FYI #612 was merged recently and makes the underlying |
I've updated this to handle I haven't created a good integration test for the keep_alive behavior yet (which is the |
@tdyas, it looks like #612 changed how the h2 error was being mapped to an error. tonic is no longer checking for an h2 error on every level, and then mapping it to the appropriate gRPC error code. It looks like it now only check in the top-level case. I think I agree from @riking's perspective that the user should only be required to check the gRPC status in order to know how to appropriately handle the gRPC error. |
@davidpdrsn It looks like the connection.rs integration test case was reasonable enough to validate what I was looking at. In that case, what I'm seeing in terms of an error chain is:
There's no underlying h2::Error |
And in particular, correctly returning UNAVAILABLE is necessary for automatic retry machinery to function. |
f887aee
to
6cd251f
Compare
This brings in a new version of the gRPC library Tonic. This may help fix some bugs[1] in status codes. This also necessitates an upgrade to the Prost protobuf lib. Proto-generated sources have been updated, though it appears the only differences is some doc formatting [1]: hyperium/tonic#629
This brings in a new version of the gRPC library Tonic. This may help fix some bugs[1] in status codes. This also necessitates an upgrade to the Prost protobuf lib. Proto-generated sources have been updated, though it appears the only differences is some doc formatting [1]: hyperium/tonic#629
This brings in a new version of the gRPC library Tonic. This may help fix some bugs[1] in status codes. This also necessitates an upgrade to Prost 0.9. Protobuf-generated sources have been updated, though it appears the only differences is some doc formatting [1]: hyperium/tonic#629
This brings in a new version of the gRPC library Tonic. This may help fix some bugs[1] in status codes. This also necessitates an upgrade to Prost 0.9. Protobuf-generated sources have been updated, though it appears the only differences is some doc formatting [1]: hyperium/tonic#629
This came up when testing retry logic when using the
tonic::transport::Error. Specifically, we would run into Unknown errors
during the following sequence:
This doesn't seem consistent with the C++ gRPC behavior, and makes
it difficult to know when to retry. hyper::Error exposes some information
about the connection that we were seeing, so this specifically handles
the cases from hyper::Error that seemed to be not covered by lower level
errors. Based on the discussion here
this also included the
is_timeout()
flag, which indicates a keep_alivefailure.
Fixes #628