danielgtaylor / danielgtaylor/python-betterproto
Reflections don't work (I may know why)
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
I use server reflection as defined in [the documentation](https://grpclib.readthedocs.io/en/latest/reflection.html) 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](https://github.com/vmagamedov/grpclib/blob/master/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](https://github.com/vmagamedov/grpclib/blob/master/examples/helloworld/helloworld_pb2.py#L17) is how the descriptors should be added in order for reflections to work with betterproto
Contributor guide
Assessment
This issue has not been assessed yet.