http service: /swagger returns 500 because of a mis-indented requestBody schema in the broken site report batch endpoint
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- openapi, python
調査の方向性
batch_prediction_broken_site_report の docstring を見つけます。これは POST /<model_name>/predict/broken_site_report/batch を文書化しています。まず properties: の下にある reports: とその子要素のインデントを修正します。次に /swagger を呼び出して仕様が読み込まれることを確認します。そのエンドポイントのテストを追加すれば、同様のミスを見つけやすくなります。
索引モデルが issue の本文から書いたものです。
説明
The /swagger endpoint of the http service fails with a 500:
File ".../apispec/ext/marshmallow/schema_resolver.py", line 290, in resolve_schema_dict
for k, v in schema["properties"].items()
AttributeError: 'NoneType' object has no attribute 'items'
The spec is generated from the docstrings of all routes, and the failing one is batch_prediction_broken_site_report (POST /<model_name>/predict/broken_site_report/batch). In its requestBody schema, reports: is at the same indentation level as properties: instead of being nested under it:
schema:
type: object
properties:
reports:
type: array
...
so properties is parsed as null. It dates back to bb54c090 (#3846). Since a single bad route makes the whole spec fail, /swagger (and the /doc page using it) are broken for every endpoint.
Fix: indent reports: (and its children) under properties:. A test calling /swagger would catch similar docstring mistakes in the future.
- 主要言語
- Python
- スター
- 579
- フォーク
- 369
- 平均マージ
- 3日 5時間
- マージ済み PR(30日)
- 139
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mozilla/bugbug のほかの issue
-
Replace the direct useag of `recorder.record()` in agent with the tool usage対応中かも @SanyaKor が 10 日前に担当しました。 オープンhackbot
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 3 日以内に返信
-
hackbot
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 3 日以内に返信
-
hackbot
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 3 日以内に返信
-
Fix ASYNC109 Ruff violations対応中かも @reginaldalfret が 44 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mozilla/bugbug#6987 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 3 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
canonical/paas-charm#407 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
FAIRmat-NFDI/pynxtools-spm#136 ·
メンテナーはふだん 1 日以内に返信
-
enhancement tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
`read_nexus` entry point points to a function that no longer exists対応中かも @RubelMozumder が今日担当しました。 オープンannotator bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
FAIRmat-NFDI/pynxtools#876 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: HTTP 499 (Client Closed Request) is classified as a non-retryable format_error, so a mid-flight abort fails the turn over instead of retrying対応中かも @yipinghuang1991 が今日担当しました。 オープンcomp/agent P2 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NousResearch/hermes-agent#156837 ·
メンテナーはふだん 1 日以内に返信