matrix-org / matrix-org/matrix-python-sdk
429 responses w/o retry_after_ms cause exception
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 266
- フォーク
- 118
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Sometimes (no idea how this is triggered) synapse sends responses with a 429 status code without the `retry_after_ms` field. In those cases, the python client crashes with a `KeyError` since https://github.com/matrix-org/matrix-python-sdk/blob/401439f020ba79197c719a9b2d51838d833b731e/matrix_client/api.py#L666 unconditionally expects `retry_after_ms` to be available on 429 responses.
A relatively simple solution would be to have our own internal exponential backoff counter that gets reset every time a request succeeds or an explicit `retry_after_ms` value is received.
What do you think?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Start at matrix_client/api.py around line 666 and inspect the 429 response handling. Done means a 429 response without retry_after_ms no longer raises KeyError, while the existing explicit retry_after_ms behavior and the proposed backoff behavior are addressed.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- api, backend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100