-
Notifications
You must be signed in to change notification settings - Fork 429
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
feat: Add separate liveness and readiness checks #5151
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
Docker builds report
|
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.
LGTM 👍
Uffizzi Preview |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5151 +/- ##
=======================================
Coverage 97.46% 97.47%
=======================================
Files 1224 1224
Lines 42545 42567 +22
=======================================
+ Hits 41466 41491 +25
+ Misses 1079 1076 -3 ☔ View full report in Codecov by Sentry. |
This PR adds separate liveness and readiness checks, to be added later in the Helm charts. The existing
/health
endpoint is maintained with no changes for backwards compatibility.The liveness check is the same as calling
/version
, which has no external dependencies. It does check that the filesystem is readable, since the version data is read from the filesystem. This is just testing that the API can respond to requests.The readiness check is the same as the current
/health
endpoint, which checks that all migrations have been applied, and the database is available. We add a separate/health/readiness
endpoint to make this obvious.We also modify the
api/scripts/healthcheck.py
script, which is used by the default Docker Compose setup. Docker Compose health checks should effectively be liveness and not readiness health checks.Tested manually by making requests to all the endpoints, and confirming there are no warnings about URL namespaces.