hyperium / tonic

A native gRPC client & server implementation with async/await support.
https://docs.rs/tonic
MIT License
9.81k stars 998 forks source link

tonic-reflection: 🆕 use `v1` reflection protobuffer definitions #1701

Closed cratelyn closed 4 months ago

cratelyn commented 4 months ago

this fixes #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 using grpc.reflection.v1.ServerReflection. (see fullstorydev/grpcurl#407)

that leads to an error regarding an unexpected status code, like this:

❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed 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 was observed as fixing these issues for our gRPC endpoint.

🩹 changes

changes in this commit are as follows:


fixes: #1685 x-ref: penumbra-zone/penumbra#4392

cratelyn commented 4 months ago

debugged ci over in my fork here. pardon the noise, this should be ready for a review now!

LucioFranco commented 4 months ago

@cratelyn sorry for the delay would you be able to resolve conflicts and then we can merge this?

cratelyn commented 4 months ago

@cratelyn sorry for the delay would you be able to resolve conflicts and then we can merge this?

@LucioFranco i sure can! :slightly_smiling_face: i've rebased this on the latest main.

cratelyn commented 4 months ago

...and once more, rebased on main!