chore: rely on MongoDB client to parse db name instead of manual URL parsing#303
chore: rely on MongoDB client to parse db name instead of manual URL parsing#303sampaiodiego merged 1 commit intomainfrom
Conversation
|
Warning Rate limit exceeded@ricardogarim has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 0 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #303 +/- ##
==========================================
+ Coverage 52.82% 52.84% +0.01%
==========================================
Files 96 96
Lines 12552 12556 +4
==========================================
+ Hits 6631 6635 +4
Misses 5921 5921 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
packages/federation-sdk/src/index.ts(0 hunks)packages/federation-sdk/src/services/database-connection.service.ts(2 hunks)packages/homeserver/src/homeserver.module.ts(1 hunks)
💤 Files with no reviewable changes (1)
- packages/federation-sdk/src/index.ts
packages/federation-sdk/src/services/database-connection.service.ts
Outdated
Show resolved
Hide resolved
24b173a to
14508a0
Compare
As per FB-72, when using MongoDB replica-set URLs (multiple hosts), the federation-matrix setup attempts to extract the database name by instantiating a URL object. Even though these MongoDB URLs are valid, the URL constructor does not support this format and throws
ERR_INVALID_URL, preventing federation from starting.This PR removes the manual URL parsing and
dbNamehandling. We now read the database name directly from the MongoDB connection string using the MongoDB client parser. If the connection string does not contain a database name, we explicitly throw a clear error.Summary by CodeRabbit
MONGO_URLenvironment variable instead ofMONGODB_URI.✏️ Tip: You can customize this high-level summary in your review settings.