feat(api): expand /health API to include database and Redis status#3826
feat(api): expand /health API to include database and Redis status#3826brian-hussey merged 14 commits intoIBM:mainfrom
Conversation
5945548 to
5055167
Compare
92c979d to
642fadd
Compare
brian-hussey
left a comment
There was a problem hiding this comment.
Hey @PawelK2012 thank you for the submission. A few minor changes requested for security, maintainability point of view.
Overall very good PR, with test coverage, clear separation of concerns between the cache details and database details and the solution maintains backward compatibility with existing health check behaviour.
If you can address the requested changes that would be great, but if you can't please let me know and I'll get them taken care of in order to get this one merged in.
Thanks, Brian
|
Thanks for the contribution @PawelK2012 — welcome to the project! 🎉 This is a thoughtful improvement and I appreciate the effort. Let me share some context on what we already have and a few suggestions: What already exists:
So the main value-add from your PR is the Redis health check and the structured response schema — both of which are useful! A few things to consider:
This is a good direction — I'd love to see it land with the adjustments above. Let me know if you have questions or want to discuss the approach! |
ca1788f to
75f6074
Compare
b049d01 to
be9128e
Compare
Hi @crivetimihai , thank you for feedback! I implemented changes you suggested:
@brian-hussey @crivetimihai please let me know if any other changes are required. |
93686b6 to
d751348
Compare
|
@brian-hussey Where did we land on this? |
|
@jonpspri This is still in my queue to review and get in. I'll be back to it shortly to get it in. |
brian-hussey
left a comment
There was a problem hiding this comment.
@PawelK2012 Thanks for correcting based on all the feedback. This is looking good now, I'll add it to our merge queue now and get it merged in shortly.
c364cd2 to
190def3
Compare
Signed-off-by: PawelK2012 <Kaim.paul@gmail.com> Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
Signed-off-by: PawelK2012 <Kaim.paul@gmail.com> Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
Signed-off-by: PawelK2012 <Kaim.paul@gmail.com> Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
Signed-off-by: PawelK2012 <Kaim.paul@gmail.com> Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
Signed-off-by: PawelK2012 <Kaim.paul@gmail.com> Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
Signed-off-by: PawelK2012 <Kaim.paul@gmail.com> Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
Signed-off-by: PawelK2012 <Kaim.paul@gmail.com> Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
Signed-off-by: PawelK2012 <Kaim.paul@gmail.com> Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
Signed-off-by: PawelK2012 <Kaim.paul@gmail.com> Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
Signed-off-by: PawelK2012 <Kaim.paul@gmail.com> Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
Signed-off-by: PawelK2012 <Kaim.paul@gmail.com> Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
190def3 to
72540e9
Compare
Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
|
@brian-hussey thank you for review! |
🔗 Related Issue
Closes # #3817
📝 Summary
Goal: The /health API currently provides a basic health signal by validating Postgres connectivity and returning a generic healthy response. To improve observability and support more granular health monitoring, the endpoint should be expanded to include explicit status checks for additional infrastructure dependencies.
This change will enhance the /health response to report the health of both Postgres and Redis, while continuing to expose a clear overall service health indicator
Service healthy
Response headers with _apply_runtime_mode_headers(response: Response)
Redis is not configured
Redis configured but unhealthy
🏷️ Type of Change
🧪 Verification
make lintmake testmake coverage✅ Checklist
make black isort pre-commit)📓 Notes (optional)
Screenshots, design decisions, or additional context.