这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@tirumaraiselvan
Copy link
Contributor

@tirumaraiselvan tirumaraiselvan commented Nov 28, 2019

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

  • Server
  • Docs

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?

@netlify
Copy link

netlify bot commented Nov 28, 2019

Deploy preview for hasura-docs ready!

Built with commit 2056101

https://deploy-preview-3440--hasura-docs.netlify.com

@hasura-bot
Copy link
Contributor

Review app for commit 54c265e deployed to Heroku: https://hge-ci-pull-3440.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3440-54c265e0

lexi-lambda
lexi-lambda previously approved these changes Dec 2, 2019
@hasura-bot
Copy link
Contributor

Review app for commit 9e1e999 deployed to Heroku: https://hge-ci-pull-3440.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3440-9e1e9998

then Spock.setStatus HTTP.status200 >> Spock.lazyBytes "OK"
else Spock.setStatus HTTP.status500 >> Spock.lazyBytes "ERROR"
dbOk <- checkDbConnection
if dbOk
Copy link
Contributor Author

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.

@hasura-bot
Copy link
Contributor

Review app for commit 1a223d3 deployed to Heroku: https://hge-ci-pull-3440.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3440-1a223d39

@tirumaraiselvan tirumaraiselvan changed the title check db connection in healthz endpoint check db connection in healthz endpoint (close #2645) Dec 3, 2019
@hasura-bot
Copy link
Contributor

Review app for commit 2056101 deployed to Heroku: https://hge-ci-pull-3440.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3440-2056101c

@lexi-lambda lexi-lambda merged commit 3cd656f into hasura:master Dec 3, 2019
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-3440.herokuapp.com is deleted

polRk pushed a commit to polRk/graphql-engine that referenced this pull request Feb 12, 2020
)

* check db connection in healthz endpoint
* use Spock.text to automatically set Content-Type
* update docs
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.

4 participants