Skip to content

fix(grpc): Ping should check health response status - #406

Closed
AruneshDwivedi wants to merge 1 commit into
hashicorp:mainfrom
AruneshDwivedi:fix/grpc-ping-health-status
Closed

AruneshDwivedi wants to merge 1 commit into
hashicorp:mainfrom
AruneshDwivedi:fix/grpc-ping-health-status

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

Fixes #341

The GRPCClient.Ping method only checks for transport errors when calling the gRPC health check, but ignores the response status. This means a plugin returning NOT_SERVING would appear healthy from the client perspective.

Changes:

  • Capture the HealthCheckResponse in Ping()
  • Verify Status == SERVING before returning nil
  • Add test confirming NOT_SERVING triggers Ping() error

Note: There is already an open PR (#377) by another contributor with a similar fix. This PR provides the same functional improvement with a regression test.

The GRPCClient.Ping method only checks transport error on health check,
but ignores the response status. A plugin returning NOT_SERVING would
appear healthy from the client perspective.

Fix: capture HealthCheckResponse, verify Status == SERVING.
Add test confirming NOT_SERVING triggers Ping() error.
@AruneshDwivedi
AruneshDwivedi requested a review from a team as a code owner September 14, 2026 16:46
@AruneshDwivedi

Copy link
Copy Markdown
Author

Closing in favor of #377 which addresses the same issue. Thanks @alliasgher!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GRPCClient Ping method does not check health response

1 participant