Flaky test: IngestionSmokeTest.test_streamLogs_ofCancelledTask (docker tests)

Cerrado Apto para principiantes
#20,435 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Ya se ha fusionado un pull request relacionado.

  • #20549 de @rishi-rana — fusionado

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
84/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
docker, java

Línea de trabajo

Comienza en IngestionSmokeTest.java alrededor de la línea 398 e inspecciona la llamada a waitForResult para test_streamLogs_ofCancelledTask. Ejecuta ConsulDiscoveryPlainDockerTest o el objetivo docker-tests y, a continuación, ajusta la condición de espera como se describe para que el log transmitido contenga "Running task[%s] for [%d] millis" y la prueba pase de forma fiable.

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

Descripción

Contributions Welcome Flaky test

This issue was generated automatically by Claude Code (Anthropic's AI coding agent) running a scheduled CI-triage routine on behalf of @FrankChen021. Analysis and suggested fixes are AI-produced; please verify before acting on them.

Status: Open: recurred after #20549
Subject: IngestionSmokeTest.test_streamLogs_ofCancelledTask, seen via ConsulDiscoveryPlainDockerTest and KubernetesClusterDockerTest (embedded-tests, docker-tests)
Failures: 2 · First seen: 2026-09-25 · Last seen: 2026-11-03

Root cause

The test reads the cancelled task's log through the embedded Overlord's TaskLogStreamer binding. The first failure (Consul variant) was a race with the Indexer writing its log file, fixed by #20549, which now polls until the log contains Running task[%s] for [%d] millis. On 2026-11-03 the KubernetesClusterDockerTest variant failed that poll: the stream stayed empty for the whole default 10 s waitForResult timeout (IngestionSmokeTest.java:454). In that subclass the embedded Overlord is deliberately not the leader (the k3s pod Overlord is), so its task runner does not know the task. It can only serve the log from deep storage, which has the log only after the MiddleManager in k3s uploads it once the cancelled peon has exited, and that can take longer than 10 s. The failing commit (#20826, a brotli version bump) does not touch this code, and the docker-tests job passed on the neighbouring master commits.

Suggested fix

Fetch the log from the leader Overlord (cluster.callApi().onLeaderOverlord(...), i.e. the /druid/indexer/v1/task/{id}/log API) rather than the local TaskLogStreamer binding, or give this wait a longer timeout (e.g. .withTimeoutMillis(60_000), matching the subclass's 60 s useDefaultTimeoutForLatchableEmitter).

Occurrences

Failed push-triggered master jobs only. The daily triage routine adds one row per new failed job.

Date Commit Job Failure log Detail Reported in
2026-09-25 53e814e87c (#20425) docker-tests job 108039867472 streamed task log was empty; single attempt (no surefire retries) #20428
2026-11-03 0bce210c62 (#20826) docker-tests / Run Docker tests job 126014185494 KubernetesClusterDockerTest: ISE: Condition not met after [10,110] ms. Final object was [] (log stream stayed empty); 1 attempt, no surefire retries
Lenguaje dominante
Java
Estrellas
14.1k
Forks
3.8k
Merge medio
2 d 2 h
PR fusionados (30 d)
210

Preparar el entorno

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 apache/druid

Todos los issues de apache/druid

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.