fix(startup): propagate database setup failures - #217
Conversation
… them _ensure_database() was catching all exceptions and returning an error string, allowing the pod to report ready while database tables did not exist. Re-raise so startup fails visibly when a configured database is unreachable. Signed-off-by: Soham Dutta <19648293+NP-compete@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review. Walkthrough
Fixed issue severity: <fixed_issue_severity>Medium</fixed_issue_severity> Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change keeps pods unready when database setup fails, preventing startup with missing tables; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
🚀 Post-Merge Actions
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
_ensure_database()now re-raises exceptions instead of returning an error string, sorun_startup()crashes before marking the pod readyCloses #216
Test plan
test_db_failure_propagates-- verifies_ensure_database()re-raisesConnectionErrortest_not_ready_when_database_fails-- verifiesrun_startup()does not set_startup_complete = Truewhen database setup fails