tonic-reflection: 🆕 use v1
reflection protobuffer definitions
#1
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 fixes hyperium#1685.
in penumbra-zone/penumbra#4392, we observed that tonic servers do not properly support reflection when servicing a request sent by recent versions of [
grpcurl
], after v1.8.8 began usinggrpc.reflection.v1.ServerReflection
. (see fullstorydev/grpcurl#407)these lead to an error regarding an unexpected status code, like this:
this adds the v1 reflection definition to
tonic-reflection
, which was observed as fixing these issues for our gRPC endpoint.🩹 changes
changes in this commet are as follows:
vendors the
v1
definition ofreflection.proto
.renames the (deprecated)
v1alpha
definition toreflection_v1alpha.proto
.tonic_reflection::generated::grpc_reflection_v1
links to the generated Rust code (created by runningcargo run --package codegen
).tonic_reflection::generated::FILE_DESCRIPTOR_SET
is replaced bytonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}
.tonic_reflection::pb
now contains namespacedtonic_reflection::pb::{v1alpha, v1}
submodules. (NB: this is a breaking change to the publictonic-reflection
API.)tonic_reflection::server
is updated to use the generatedtonic_reflection::pb::v1
code.fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
Motivation
Solution