Skip to content

symbols: add healthz endpoint

Administrator requested to merge symbols-health into master

Created by: ggilmore

Part of https://github.com/sourcegraph/sourcegraph/issues/1202

This PR adds a simple health checkpoint to the symbols service. After this is merged, I will open a PR in https://github.com/sourcegraph/deploy-sourcegraph that adds the health check to the symbols deployment.

I haven't tested this in a K8s environment yet. However, I think it's okay to open this PR since the change is simple.


We currently use the healthz endpoint as both a health/liveness check for frontend here:

https://github.com/sourcegraph/deploy-sourcegraph-dot-com/blob/e330905a9e932888899206a545762f1ee4a65860/base/frontend/sourcegraph-frontend.Deployment.yaml#L188-L204

While looking at https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+healthz+language:go though, it wasn't clear to me if / how that endpoint actually ensures that frontend is healthy/contactable (i.e. Are we sure that frontend is always healthy / able to field requests if /healthz returns a valid response? It seems like healthz will always return "Ok" no matter the circumstance).

Similarly to frontend's implementation, the healthz endpoint for the symbols service in this PR doesn't do any extra validation/verification about the health of the service.

Merge request reports

Loading