danielgtaylor / danielgtaylor/python-betterproto
Reflections don't work (I may know why)
- Lenguaje dominante
- Python
- Estrellas
- 1.8k
- Forks
- 234
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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
Guía de contribución
Línea de trabajo
Empieza reproduciendo las llamadas de reflection descritas en el issue y, después, inspecciona grpclib/reflection/_deprecated.py en la búsqueda enlazada y examples/helloworld/helloworld_pb2.py en la configuración del descriptor enlazada. Se considera terminado cuando file_containing_symbol para helloworld.Greeter se resuelve correctamente, mientras list_services sigue devolviendo el servicio.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- grpc, python
- Área
- api, backend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100