Tests in test_risk_filter.py fail when CI runs shortly after midnight UTC
メンテナーはふだん 6 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 85/100
調査の方向性
src/tests/endpoints/test_risk_filter.pyを読み、まずtest_sequences_fromdate_pagination_filters_before_limitと、392行目付近にあるrisk_score=moderateのキルスイッチテストを確認してください。minutes_agoのシードとfrom_date=todayを組み合わせているファイル内の他のテストを探し、それらの日付が現在のUTC時刻に依存しないようにしてください。このファイルのpytestテストを実行してください。エンドポイントを変更せず、どの時刻でもテストが通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
Context
The pytest job of #724 failed at 00:28 UTC on 2026-10-30 (run 40979934588) on two tests that the PR did not touch. A re-run during the day passed.
Cause
In src/tests/endpoints/test_risk_filter.py, test_sequences_fromdate_pagination_filters_before_limit and the risk_score=moderate kill-switch test (around line 392) seed sequences with _seed_unlabeled_sequence(..., minutes_ago=30..50) and then query /sequences/all/fromdate?from_date=<today UTC>. Within ~50 minutes after midnight UTC, the seeded sequences fall on the previous day and are not returned:
tests/endpoints/test_risk_filter.py:392: assert set(seeded).issubset(returned_ids) -> assert False
tests/endpoints/test_risk_filter.py:631: assert len(page) == 3 -> assert 1 == 3
What has to be done
- Make these tests independent of the current UTC hour, e.g. seed at a fixed time earlier today (midnight + a few minutes) or derive
from_datefrom the seededstarted_at. - Check the other tests of the file that use the same
minutes_ago+from_date=todaypattern.
Done when
- The file passes whatever the time of day
- No endpoint change
- 主要言語
- Python
- スター
- 30
- フォーク
- 15
- 平均マージ
- 7日 16時間
- マージ済み PR(30日)
- 16
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pyronear/pyro-api のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 6 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 6 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
メンテナーはふだん 6 日以内に返信
-
Share an alert with a temporary public link対応中かも @Acruve15 が 9 日前に担当しました。 オープンtype: feat
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
メンテナーはふだん 6 日以内に返信
-
type: feat
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 6 日以内に返信
pyronear/pyro-api の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
igormcsouza/tether#278 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
aws-samples/sample-per-model-bedrock#803 ·
メンテナーはふだん 1 日以内に返信
-
documentation p1
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
huggingface/accelerate#4511 ·
メンテナーはふだん 1 日以内に返信
-
follow-up
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信