HealthCheckServiceInstanceListSupplier docs say all instances are returned when none are healthy, but code returns an empty list
メンテナーはふだん 1 日以内に返信
@bhosale-mahesh がすでに取り組んでいます。
2026年10月17日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 50/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- java, spring, spring-boot
- 領域
- backend, documentation, testing
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Java
- スター
- 751
- フォーク
- 746
- 平均マージ
- 16時間 35分
- マージ済み PR(30日)
- 23
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
spring-cloud/spring-cloud-commons のほかの issue
-
waiting-for-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
spring-cloud/spring-cloud-commons#1708 ·
メンテナーはふだん 1 日以内に返信
-
waiting-for-triage
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
spring-cloud/spring-cloud-commons#1543 ·
メンテナーはふだん 1 日以内に返信
-
waiting-for-triage
難易度 5/5 1週間以上 初心者へのやさしさ 48/100
spring-cloud/spring-cloud-commons#1727 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement for team discussion
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
spring-cloud/spring-cloud-commons#1676 ·
メンテナーはふだん 1 日以内に返信
-
waiting-for-triage
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
spring-cloud/spring-cloud-commons#1675 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
spring-cloud/spring-cloud-commons の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/rocketmq-dashboard#7302 ·
メンテナーはふだん 3 日以内に返信
-
area: android good first issue help wanted testing
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Gautam-aman/ResQNet#56 ·
メンテナーはふだん 1 日以内に返信
-
documentation hermes-queue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
chrisalunlloyd2-sudo/mindpalace#294 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
QuicksilverMC/Argentum#31 ·