palantir / policy-bot

A GitHub App that enforces approval policies on pull requests
Apache License 2.0
777 stars 108 forks source link

/api/health endpoint does not actually indicate service health #842

Open reegnz opened 2 months ago

reegnz commented 2 months ago

I've tried integrating policy-bot with kubernetes readyness probes but to no avail. The health endpoint reports 200 OK very early in the startup process, and the service will keep responding with 504 for several seconds after the health endpoint already reporting 200 OK.

Would be great if the health endpoint would actually indicate whether the service is already up and running.

bluekeyes commented 2 months ago

Thanks for the report. The behavior you describe is surprising to me, because the last thing Policy Bot does at startup is enable the HTTP server, which serves the /api/health route and all other routes. If you can get a response from /api/health you should be able to get a valid response from any other endpoint.

Are there any more details you can share about the error you are seeing? Would it be possible to share the Kubernetes manifest you are using to deploy the app?