vmagamedov/grpclib

Reflection protocol v1alpha

SoerenBusse opened this issue · 8 comments

Hey there,

I can't get the reflection protocol working with grpclib. I've tried it exactly like in your example:

self.services = ServerReflection.extend(self.services)
grpc_server: Server = Server(self.services)

However programs like grpcurl only grpcox only reports Failed to list services: server does not support the reflection API. They're requesting the following method, which can't be found:

/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo
Adding (b'grpc-message', b'Method not found') to the header table

Might this be related to the change in version 0.30 Removed v1alpha reflection protocol, v1 remains. What was the reason to remove v1alpha reflection protocol? I can't find any references to a reflection protocol v1. https://github.com/grpc/grpc/tree/master/src/proto/grpc/reflection

Thank you very much in advance

Edit:
I've just tried version 0.2.5 and I can successfully use the reflection api.

Hi! I had difficulties to cover nicely both versions with typing hints without code duplication and decided that it is ok to remove old version since grpc_cli and grpcurl both supports v1. You can find all actual gRPC-related proto files here: https://github.com/grpc/grpc-proto

Thank you very much for the fast reply. I'm a little bit confused about the grpc reflection protocol version. When I have a look at the official grpc source code I can't find any hint to the v1 reflection protocol:
https://github.com/grpc/grpc/blob/master/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py
All of them, including grpcurl, are referring to v1alpha in their code. Is v1 really already used or is it just an proposal? How do I get grpcurl to use the v1 version? If I just run the list command against a server using this library I only get the output from above.

I can't find any usage of the v1 reflection protocol service:
https://github.com/grpc/grpc/search?utf8=%E2%9C%93&q=grpc.reflection.v1.ServerReflection&type=

Sorry, seems like I'm inappropriately tested v1 support, and everyone still uses v1alpha. I will return old/current version soon.

Fix is released in grpclib==0.3.1rc2

@vmagamedov, are you planning on bumping that to 0.3.1 for real anytime soon? The fix seems to work great!

(apologies for driving by on a random, closed issue. it wasn't clear to me if commenting here or opening a new one was the preferred protocol)

Will make proper release soon.

(It is ok to communicate in any possible way 😄)

@tjstum released 0.3.1 version

awesome, thanks!