fix: validate service port conflicts on same host#326
Conversation
Reject database specs where two services bind the same explicit port on the same host. Previously the conflict was only caught at Docker deploy time, resulting in an opaque context deadline exceeded error. Nil ports and port 0 (random assignment) are excluded from checking.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdded explicit cross-service and service-vs-database port conflict validation to database spec create and update paths: services’ explicit ports are checked against a host-port ownership map (pre-seeded with Postgres ports) and conflicts produce field-path validation errors. Changes
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 11 |
| Duplication | 0 |
TIP This summary will be updated as you push new changes. Give us feedback
This ensures all instances (database and service) avoid port conflicts.
Summary
(hostID, port)pairs across all services and reject duplicates where port > 0Test plan
make testpassesPLAT-531