worker: /health reports ok for a stopped or wedged worker (revisits #138)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
Línea de trabajo
Lee apps/worker/src/index.ts e inspecciona Worker.stop() y Worker.poll(), especialmente cómo se actualizan running y lastPollTime alrededor del polling y de los lotes de trabajos. Prueba /health con un Worker detenido, un polling bloqueado y un trabajo saludable de larga duración; se considera completado cuando los estados no saludables se rechazan sin hacer que falle un lote saludable en curso.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Found during the review of #180; the fix attempted there was reverted because it broke the healthy path (see below).
apps/worker/src/index.ts returns 200 {status:'ok', ...health} whenever the worker object exists. It never consults running or lastPollTime, so:
- Stopped worker reports healthy.
Worker.stop()setsrunning = falsewithout exiting the process — including from Worker's own signal handlers — leaving/healthserving200 {"status":"ok","running":false}. - Wedged poll loop reports healthy.
Worker.poll()catches every error and reschedules. A poll blocked on a hung database call leavesrunning: trueandlastPollTimefrozen, and/healthreturns 200 forever while the queue backs up.
Important constraint for whoever picks this up: the naive fix (503 when lastPollTime is stale) breaks the healthy path. Worker.poll() stamps lastPollTime at the top and then awaits the job batch, so the timestamp legitimately freezes for the whole batch — up to the 300s jobTimeouts. A 60s staleness bound therefore 503s a perfectly healthy worker mid-job and lets the container healthcheck kill it. That regression was caught in review and is why this is not already fixed.
Any real fix probably needs Worker to stamp when it schedules the next poll rather than when one begins, or to gate the stalled verdict on activeJobCount === 0.
- Lenguaje dominante
- TypeScript
- Estrellas
- 12
- Forks
- 6
- Merge medio
- 2 h 23 min
- PR fusionados (30 d)
- 2
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin 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 CopilotKit/outpost
-
area: docs area: security roadmap: now
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
CopilotKit/outpost#277 ·
Los mantenedores suelen responder en 1 día
-
area: infrastructure roadmap roadmap: later
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
CopilotKit/outpost#179 ·
Los mantenedores suelen responder en 1 día
-
area: ai roadmap roadmap: now
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CopilotKit/outpost#145 ·
Los mantenedores suelen responder en 1 día
-
area: integrations priority: low roadmap roadmap: later
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
CopilotKit/outpost#124 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
area: integrations priority: low roadmap roadmap: later
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
CopilotKit/outpost#123 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de CopilotKit/outpost
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
microsoft/playwright#43327 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/TypeScript#64758 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
opensearch-project/OpenSearch-Dashboards#12937 ·
Los mantenedores suelen responder en 2 días
-
Liveness marks block-included attesters live in the block's epoch instead of the attestation's epochAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
status: needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
a2ui-project/a2ui#3158 ·
Los mantenedores suelen responder en 2 días