HealthCheckServiceInstanceListSupplier docs say all instances are returned when none are healthy, but code returns an empty list
Los mantenedores suelen responder en 1 día
@bhosale-mahesh ya está trabajando en esto.
Desde el 17/10/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 50/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java, spring, spring-boot
- Área
- backend, documentation, testing
Línea de trabajo
Start by reading HealthCheckServiceInstanceListSupplier.java around the Flux.merge result handling and comparing the behavior with the reference documentation. Check HealthCheckServiceInstanceListSupplierTests.java, especially shouldEmitAllInstancesIfAllIsAliveChecksFailed, to understand the currently asserted empty-list behavior. Before changing anything, determine from project discussion whether the intended fix is documentation, Javadoc, the test name, or the implementation; done means the documented, tested, and implemented behavior agree.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The docs, javadoc and one test name say HealthCheckServiceInstanceListSupplier returns all instances when none are healthy. Code and test assertions return an empty list. Checked on v5.0.3 and main.
What the docs say
Instance Health-Check for LoadBalancer:
It regularly verifies if the instances provided by a delegate
ServiceInstanceListSupplierare still alive and only returns the healthy instances, unless there are none - then it returns all the retrieved instances.
Class javadoc says "...only returns the healthy one, unless there are none."
What the code does
When all checks fail, Flux.merge(checks) emits nothing. Both paths then produce an empty list:
HealthCheckServiceInstanceListSupplier.java lines for the result / defaultIfEmpty(result) / collectList() block
List<ServiceInstance> result = new ArrayList<>();
if (healthCheck.isUpdateResultsList()) {
return Flux.merge(checks).map(alive -> {
result.add(alive);
return result;
}).defaultIfEmpty(result); // result is empty
}
return Flux.merge(checks).collectList(); // empty list
What the tests assert
shouldEmitAllInstancesIfAllIsAliveChecksFailed: the name says "all", the assertion expects an empty list.
HealthCheckServiceInstanceListSupplierTests.java lines for that test
.expectNext(Lists.list())
shouldRepeatIsAliveChecksIndefinitely and shouldTimeoutIsAliveCheck also expect [] in the first round.
Question
Which one is intended?
- Docs are wrong: Will create PR for fix in docs, javadoc and the test name.
- Code is wrong: Will create PR returns all instances when none are healthy, with tests.
- Lenguaje dominante
- Java
- Estrellas
- 751
- Forks
- 746
- Merge medio
- 16 h 35 min
- PR fusionados (30 d)
- 23
Preparar el entorno
- Sin Dockerfile ni 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 spring-cloud/spring-cloud-commons
-
waiting-for-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
spring-cloud/spring-cloud-commons#1708 ·
Los mantenedores suelen responder en 1 día
-
waiting-for-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
spring-cloud/spring-cloud-commons#1543 ·
Los mantenedores suelen responder en 1 día
-
waiting-for-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 48/100
spring-cloud/spring-cloud-commons#1727 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
enhancement for team discussion
Dificultad 5/5 Más de una semana Aptitud para principiantes 42/100
spring-cloud/spring-cloud-commons#1676 ·
Los mantenedores suelen responder en 1 día
-
waiting-for-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
spring-cloud/spring-cloud-commons#1675 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de spring-cloud/spring-cloud-commons
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
quarkusio/quarkus-agent-mcp#296 ·
Los mantenedores suelen responder en 1 día
-
enhancement web-ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
jenkinsci/jenkins#27583 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/rocketmq-dashboard#7302 ·
Los mantenedores suelen responder en 3 días
-
area: android good first issue help wanted testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Gautam-aman/ResQNet#56 ·
Los mantenedores suelen responder en 1 día