Coverage comment replaces "1 Tests Failed" with "All tests successful" when the failing test passed in another CI job

Abierto
#989 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Área
testing

Línea de trabajo

Start by reading the linked investigation in get_pr_comment_agg, calc_test_id, get_test_status, and the notify task, then trace how JUnit results from multiple flagged uploads are combined. Check how the existing tests cover mixed pass and fail results across uploads. Done means the failure remains visible and the comment does not claim all tests passed when any upload reports a failure.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Describe the bug
We upload JUnit results from multiple CI matrix jobs, each with its own flag. A test has failed in one job but passed in others that upload later, Codecov first posted a "❌ 1 Tests Failed" comment but then replaced it with the coverage report, which even says "✅ All tests successful. No failed tests found."

See https://github.com/scrapy/scrapy/pull/8387

Screenshots

Image

Additional context
LLM-provided investigation:

get_pr_comment_agg (https://github.com/codecov/umbrella/blob/65af8ae7d13eae4e83f179e2937b1bf18de00ba9/apps/worker/services/test_analytics/ta_timeseries.py#L197-L207) keeps only the latest outcome of each test_id across all uploads of the commit: LAST(outcome, timestamp) … GROUP BY test_id. calc_test_id (https://github.com/codecov/umbrella/blob/65af8ae7d13eae4e83f179e2937b1bf18de00ba9/apps/worker/services/test_analytics/ta_timeseries.py#L46-L48) hashes only name,
classname and testsuite, not the flags. So a later pass in another job hides the failure, get_test_status (https://github.com/codecov/umbrella/blob/65af8ae7d13eae4e83f179e2937b1bf18de00ba9/apps/worker/helpers/ta_status.py) returns any_failures=False, all_passed=True, and the notify task (https://github.com/codecov/umbrella/blob/65af8ae7d13eae4e83f179e2937b1bf18de00ba9/apps/worker/tasks/notify.py#L229-L250) goes ahead and overwrites the comment.

Though, to be honest, I wouldn't expect it to say "All tests successful" when a test failed, even when not using flags.

Lenguaje dominante
Sin datos de lenguaje
Estrellas
52
Forks
26
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de codecov/feedback

Todos los issues de codecov/feedback

Issues similares

Más issues de Testing & QA

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.