tonic-reflection: use `v1` reflection protobuffer definitions (#1701)this fixes #1685.in penumbra-zone/penumbra#4392, we observed that tonic servers do notproperly support reflection when ser
tonic-reflection: use `v1` reflection protobuffer definitions (#1701)this fixes #1685.in penumbra-zone/penumbra#4392, we observed that tonic servers do notproperly support reflection when servicing a request sent by recentversions of [`grpcurl`], after [v1.8.8] began using`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)these lead to an error regarding an unexpected status code, like this:```❯ grpcurl --versiongrpcurl v1.9.1❯ grpcurl -vv grpc.testnet.penumbra.zone:443 listFailed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type```this adds the v1 reflection definition to `tonic-reflection`, which wasobserved as fixing these issues for our gRPC endpoint. ### changeschanges in this commet are as follows:* vendors the `v1` definition of [`reflection.proto`][proto].* renames the (deprecated) `v1alpha` definition to `reflection_v1alpha.proto`.* `tonic_reflection::generated::grpc_reflection_v1` links to the generated Rust code (created by running `cargo run --package codegen`).* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.* `tonic_reflection::pb` now contains namespaced `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a breaking change to the public `tonic-reflection` API.**)* `tonic_reflection::server` is updated to use the generated `tonic_reflection::pb::v1` code.[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto[grpcurl]: https://github.com/fullstorydev/grpcurl---fixes: #1685x-ref: penumbra-zone/penumbra#4392Co-authored-by: Conor Schaefer <[email protected]>
show more ...
feat: Implement gRPC Reflection Service (#340)Co-authored-by: Samani G. Gikandi <[email protected]>