danielgtaylor / danielgtaylor/python-betterproto
Reflections don't work (I may know why)
- Langage dominant
- Python
- Étoiles
- 1.8k
- Forks
- 234
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par reproduire les appels de reflection décrits dans l’issue, puis examinez grpclib/reflection/_deprecated.py au niveau de la recherche indiquée par le lien et examples/helloworld/helloworld_pb2.py au niveau de la configuration du descriptor indiquée par le lien. C’est terminé lorsque file_containing_symbol pour helloworld.Greeter se résout correctement, tandis que list_services continue de renvoyer le service.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- grpc, python
- Domaine
- api, backend
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100