fix(health): register /healthz liveness probe route (#870)#889
Draft
vivekchand wants to merge 1 commit intomainfrom
Draft
fix(health): register /healthz liveness probe route (#870)#889vivekchand wants to merge 1 commit intomainfrom
vivekchand wants to merge 1 commit intomainfrom
Conversation
Cloud Run and Kubernetes send GET /healthz for health checks, but the
route was never registered in bp_health, causing a 404. Add a minimal
handler that returns {"status":"ok","version":"<ver>"} so the probe
passes without any blocking I/O.
Closes #870
Co-Authored-By: ClawMetry Autofix Bot <bot-autofix@clawmetry.dev>
5 tasks
This file contains hidden or 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
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.
Summary
GET /healthzwas returning 404 because the route was never registered inbp_health. Cloud Run (and Kubernetes) use this path as a liveness probe, so a missing route means the health check silently fails. This PR adds a minimal, non-blocking handler that returns{"status": "ok", "version": "..."}.Changes
routes/health.py: addGET /healthzhandler at the end ofbp_health; update module docstring route count from 11 → 12Test plan
python3 -c 'import ast; ast.parse(open("routes/health.py").read())'— syntax cleanmake dev) and runcurl -si http://localhost:8900/healthz— expectHTTP/1.1 200 OKwith{"status":"ok","version":"..."}/api/healthendpoint still returns its full JSON payload unaffectedBot meta
Draft PR opened autonomously based on the plan in #870. Marked draft for human review — mark Ready for Review once happy.
Closes #870
Generated by Claude Code