Tests in test_risk_filter.py fail when CI runs shortly after midnight UTC
Los mantenedores suelen responder en 6 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 85/100
Línea de trabajo
Lee src/tests/endpoints/test_risk_filter.py, empezando por test_sequences_fromdate_pagination_filters_before_limit y la prueba del interruptor de desactivación risk_score=moderate alrededor de la línea 392. Busca otras pruebas del archivo que combinen semillas minutes_ago con from_date=today y haz que sus fechas sean independientes de la hora UTC actual. Ejecuta las pruebas pytest del archivo; estará listo cuando pasen a cualquier hora del día sin cambios en los endpoints.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 30
- Forks
- 15
- Merge medio
- 7 d 16 h
- PR fusionados (30 d)
- 16
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pyronear/pyro-api
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 6 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 6 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 42/100
Los mantenedores suelen responder en 6 días
-
Share an alert with a temporary public linkPosiblemente ocupada @Acruve15 la tomó hace 9 días. Abiertotype: feat
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
Los mantenedores suelen responder en 6 días
-
type: feat
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 6 días
Todos los issues de pyronear/pyro-api
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
huggingface/accelerate#4511 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
pylint-dev/pylint#11791 ·
Los mantenedores suelen responder en 1 día
-
Rasterio granule reads never retry, so one 503 (Service Unavailable) fails the whole requestPosiblemente ocupada @chuckwondo la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
developmentseed/titiler-cmr#305 ·
Los mantenedores suelen responder en 1 día
-
community enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día