mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #3830] [feature]: add health check checking the DB connection #1343
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1343
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RaHehl on GitHub (Feb 15, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3830
Is there an existing issue for this?
Summary
I need a health check that also checks whether the database is accessible.
The current "ping" does not check whether the DB is reachable packages/hoppscotch-backend/src/app.controller.ts
A simple SELECT 1 would be enough
I currently have the problem that Hoppscotch is no longer accessible when the DB credentials are updated automatically, and the health check does not activate the new ones by restarting the pod because the health check is still successful.
Why should this be worked on?
see above
@Shub3am commented on GitHub (Feb 16, 2024):
Can i work on this?
@balub commented on GitHub (Apr 29, 2024):
@RaHehl Could you give us more clarity on the expectations of this feature.
Please feel free to correct me if I got this wrong, but do you want the current
/pingroute also run a simple "SELECT 1` query against the DB to check if the backend instance can communicate with the DB, even after the DB creds change?@RaHehl commented on GitHub (Apr 29, 2024):
@balub
this does not necessarily have to be /ping, e.g. /health would be OK too.
The health check currently does not check whether the backend can establish a connection to the database.
Perhaps a clean solution would be to integrate Terminus, as described in the NestJS example:
https://docs.nestjs.com/recipes/terminus#healthchecks-terminus
https://github.com/nestjs/terminus/blob/master/sample/012-prisma-app/src/health/health.controller.ts
@balub commented on GitHub (Apr 29, 2024):
@RaHehl understood, I just wanted to make sure we were on the same page when talking about we wanted a way to check if the backend can talk to the database. We will look into Terminus looks promising.