danielgtaylor / python-betterproto

Clean, modern, Python 3.6+ code generator & library for Protobuf 3 and async gRPC
MIT License
1.56k stars 218 forks source link

Reflections don't work (I may know why) #443

Open BananaLoaf opened 2 years ago

BananaLoaf commented 2 years ago

I use server reflection as defined in the documentation and I have a single service called helloworld.Greeter.

gRPC call list_services: "*" is processed fine and returns a single service helloworld.Greeter.

However, file_containing_symbol: "helloworld.Greeter" only returns an error not found

Throughout my own investigation I found that error can be traced to grpclib/reflection/_deprecated.py:L79 Where self._pool does not have any descriptors for helloworld.Greeter or any of its methods

I suspect that THIS is how the descriptors should be added in order for reflections to work with betterproto

BananaLoaf commented 2 years ago

I have managed to fix reflections by using command poetry run python -m grpc_tools.protoc -I protos --python_out=package_name/grpc_python and importing everything that is in package_name/grpc_python to populate descriptors before starting the server.

However, paths in those files are broken and this solution is barely usable.

DeoLeung commented 1 year ago

I'm trying to do reflection via grpclib using better proto

is it working or any example I can follow?

narma commented 1 year ago

Have same issue

sinwoobang commented 6 days ago

Same issue here, is nobody working on it?

Gobot1234 commented 4 days ago

AFAICT no @sinwoobang