hashicorp / hashicorp/go-plugin
GRPCClient Ping method does not check health response
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 511
- Avg merge
- 22h 47m
- Merged PRs (30d)
- 4
Description
I've been working on a Node based plugin and was testing to see if my health service is working, and I noticed that the current GRPCClient implementation for `Ping()` doesn't actually evaluate if the service is healthy (`SERVING`):
https://github.com/hashicorp/go-plugin/blob/cfdf485783602a2ca85502dedebf441be7bcbc8d/grpc_client.go#L127-L134
Instead of just checking for `err` (which would tell you if the service was "hard down", or didn't implement `/grpc.health.v1.Health/Check`), this should also check the response from `client.Check` to check that it returned `grpc_health_v1.HealthCheckResponse_SERVING`.
Changing this would probably break a lot of people's stuff right now, but I thought I'd point it out.
Contributor guide
Assessment
This issue has not been assessed yet.