Skip to content

spring.grpc.server.health.include-overall-health is not taken into account#50799

Open
xfocus3 wants to merge 1 commit into
spring-projects:mainfrom
xfocus3:gh-50791-grpc-health-overall
Open

spring.grpc.server.health.include-overall-health is not taken into account#50799
xfocus3 wants to merge 1 commit into
spring-projects:mainfrom
xfocus3:gh-50791-grpc-health-overall

Conversation

@xfocus3

@xfocus3 xfocus3 commented Jun 20, 2026

Copy link
Copy Markdown

Fixes gh-50791

spring.grpc.server.health.include-overall-health=false was bound but not used by the auto-configured gRPC health components. The overall server component was always created, so scheduled gRPC health updates still evaluated all health contributors even when overall health reporting was disabled.

This change makes the auto-configured server component nullable and omits it when overall health reporting is disabled. Service-specific health components continue to be created from spring.grpc.server.health.service.* settings.

Verification:

  • RED: ./gradlew :module:spring-boot-grpc-server:test --tests org.springframework.boot.grpc.server.autoconfigure.health.AutoConfiguredHealthCheckedGrpcComponentsTests.getServerWhenIncludeOverallHealthIsFalseReturnsNull --no-daemon failed before the fix.
  • GREEN: ./gradlew :module:spring-boot-grpc-server:test --tests org.springframework.boot.grpc.server.autoconfigure.health.AutoConfiguredHealthCheckedGrpcComponentsTests.getServerWhenIncludeOverallHealthIsFalseReturnsNull --tests org.springframework.boot.grpc.server.autoconfigure.health.GrpcServerHealthAutoConfigurationTests.whenIncludeOverallHealthIsFalseDoesNotReportOverallHealth --no-daemon
  • GREEN: ./gradlew :module:spring-boot-grpc-server:test --tests org.springframework.boot.grpc.server.autoconfigure.health.AutoConfiguredHealthCheckedGrpcComponentsTests --tests org.springframework.boot.grpc.server.autoconfigure.health.GrpcServerHealthAutoConfigurationTests --no-daemon
  • GREEN: ./gradlew :module:spring-boot-grpc-server:checkstyleMain :module:spring-boot-grpc-server:checkstyleTest --no-daemon
  • GREEN: git diff --check HEAD^ HEAD

Signed-off-by: Ahmed El amraouiyine <amraouiyine@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 20, 2026
@snicoll snicoll added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 22, 2026
@snicoll snicoll self-assigned this Jul 22, 2026
@snicoll snicoll changed the title Honor include-overall-health in gRPC health spring.grpc.server.health.include-overall-health is not taken into account Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spring gRPC health check triggers MailHealthIndicator eagerly

3 participants