-
Notifications
You must be signed in to change notification settings - Fork 2.8k
check db connection in healthz endpoint (close #2645) #3440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Deploy preview for hasura-docs ready! Built with commit 2056101 |
|
Review app for commit 54c265e deployed to Heroku: https://hge-ci-pull-3440.herokuapp.com |
|
Review app for commit 9e1e999 deployed to Heroku: https://hge-ci-pull-3440.herokuapp.com |
| then Spock.setStatus HTTP.status200 >> Spock.lazyBytes "OK" | ||
| else Spock.setStatus HTTP.status500 >> Spock.lazyBytes "ERROR" | ||
| dbOk <- checkDbConnection | ||
| if dbOk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was no content-type set when using lazyBytes, also no point using lazyBytes for such small strings.
|
Review app for commit 1a223d3 deployed to Heroku: https://hge-ci-pull-3440.herokuapp.com |
|
Review app for commit 2056101 deployed to Heroku: https://hge-ci-pull-3440.herokuapp.com |
|
Review app https://hge-ci-pull-3440.herokuapp.com is deleted |
Description
Currently, /healthz endpoint does not check for db connectivity. It seems vital to check for db connectivity in the health check.
Also, /healthz throws 500 when inconsistent objects are detected. This seems not really correct because hasura starts and functions even with inconsistent objects. We should throw a WARN here instead.
Affected components
Related issues
Not exactly sure what this issue means but I think we should close this with this PR
#2645
Limitations, known bugs & workarounds
Should we add some check here which checks whether graphql API is working?