Add health dashboard route#20
Conversation
|
Warning @shengtenghou4-star this pull request is linked to an issue that is already assigned to another user. Please link it to an open issue assigned to you or to an unassigned open issue. |
📝 WalkthroughWalkthroughThis PR adds a health-check dashboard feature accessible at 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9523ceb3-1e92-4d27-8ba2-23cf02c21cc6
📒 Files selected for processing (3)
src/health-dashboard.tssrc/worker.tstests/worker-routing.test.ts
| ok: response.status < 500, | ||
| status: response.status, |
There was a problem hiding this comment.
Use a stricter health predicate for upstream responses.
Line 120 marks any <500 as healthy, so 404/401 are reported as healthy. That can hide broken routes in the dashboard.
Suggested fix
- ok: response.status < 500,
+ ok: response.status >= 200 && response.status < 400,📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ok: response.status < 500, | |
| status: response.status, | |
| ok: response.status >= 200 && response.status < 400, | |
| status: response.status, |
Summary
health.ubq.fidashboard route to the Worker router/api/healthplus/__health/checksJSONValidation
npm run type-checknpx bun testgit diff --checkResolves #3
/claim #3