-
Notifications
You must be signed in to change notification settings - Fork 9
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: healthcheck #401
Merged
Merged
feat: healthcheck #401
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- adds liveliness endpoint for healthcheck
- adds DatabaseHealthCheck to check db is live and ready + first tests - adds HealthService to check on all registered HealthChecks
- java doc HealthCheck interface
- adds also DbPool startup in HealthServletTest
- add tests for DatabaseService on live
- add test for HealthServlet when db started/not started
- adds HealthResponse POJO for health JSON response - document DbPool getDatabaseConnection instance-level method - small refactors in methods naming and variables
- update HealthServletTest to use mariadb 10.4.31
- fix doCheckStatus to return correct status(was returning true always) - simplify canConnectToDatabase and make it private - align tests with changes
- improve builder - add javadoc
- add logging - simplify response creation - handle unknown routes (return 404) - improve test readability
- found jna is needed by zmconfigd Jython and no others, directly. Was updated beacuse needed by TestContainers
4421685
to
ad35c7a
Compare
… needed by other use health checks - avoid putting caching logic on abstract class (YAGNI)
keshavbhatt
requested changes
Dec 12, 2023
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.
I just ask if it is okay to rely on this endpoint in production to suggest if mailbox is healthy. I suggest to wait for addition of other required service dependencies.
keshavbhatt
approved these changes
Dec 12, 2023
matteobaglini
approved these changes
Dec 12, 2023
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
The goal is to introduce the three health check endpoints (/health, /health/live, /health/ready) that should be available on every Carbonio service.
Health check implementation
Testing