Stop logging refused economy requests at ERROR
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
Read policyengine_api/services/economy_service.py and policyengine_api/services/economy_budget_window_submission.py, then check how the routes distinguish refused requests from other failures. The expected behavior is to log refused requests at WARNING with a refusal message while keeping other failures at ERROR; inspect the telemetry grouping behavior described in the issue to confirm completion.
索引モデルが issue の本文から書いたものです。
説明
The economy service logs every request it refuses at ERROR, so refused requests form error groups in the daily telemetry error report.
What happens
EconomyService.get_economic_impact (policyengine_api/services/economy_service.py) and get_budget_window_economic_impact (policyengine_api/services/economy_budget_window_submission.py) each wrap their work in except Exception, log "Error getting economic impact" (or "Error getting budget-window economic impact") at ERROR with the exception's type, and re-raise.
That block also runs for requests the routes answer with a client error:
- 400 for a
time_periodor budget-windowstart_yearoutside the country's years (SPMValidationErrorwithDATASET_YEAR_UNAVAILABLE, added by #4212); - 400 for any other
ValueErrorfrom request validation, such as an unknown UK region; - 404 for a policy the country does not have (
PolicyNotFoundError).
The telemetry error report reads every record at severity ERROR or above (severity_number >= 500 in .github/scripts/telemetry_error_issues/bigquery.py). A refused request's completion record is INFO (outcome client_error), so the service's own ERROR record is the only record that puts it in an error group, as a message group on the economy route. #4212 now refuses UK economy years outside 2024 to 2032, the main source of #4099, #4216, #4217 and #4218, so each of those refusals would form a new error group.
Expected
A refused request is logged at WARNING, under a message that says it was refused, and adds no record at ERROR. Any other failure is still logged at ERROR, including a ValueError raised after the request passed validation, which the route also answers with 400.
- 主要言語
- Python
- スター
- 18
- フォーク
- 33
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 110
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PolicyEngine/policyengine-api のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
PolicyEngine/policyengine-api#4037 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
PolicyEngine/policyengine-api#3911 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
PolicyEngine/policyengine-api#3910 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
PolicyEngine/policyengine-api#4221 ·
メンテナーはふだん 2 日以内に返信
-
service: policyengine-simulation-gateway telemetry-error
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
PolicyEngine/policyengine-api#4218 ·
メンテナーはふだん 2 日以内に返信
PolicyEngine/policyengine-api の issue をすべて見る
似ている issue
-
binding:python bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
The Browser tab fails with a Wayland error when Open Terminal runs from a Wayland desktop sessionオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
open-webui/open-terminal#210 ·
-
triage/confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
agentscope-ai/agentscope#3807 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#150542 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
triton-inference-server/server#9069 ·
メンテナーはふだん 1 日以内に返信