danielgtaylor / danielgtaylor/python-betterproto
Reflections don't work (I may know why)
- 主要言語
- Python
- スター
- 1.8k
- フォーク
- 234
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
コントリビューションガイド
調査の方向性
まず、issue に記載されている reflection 呼び出しを再現し、次にリンクされた lookup の grpclib/reflection/_deprecated.py と、リンクされた descriptor セットアップの examples/helloworld/helloworld_pb2.py を調査します。file_containing_symbol が helloworld.Greeter に対して正常に解決され、list_services が引き続きサービスを返せば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- grpc, python
- 領域
- api, backend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100