-
Notifications
You must be signed in to change notification settings - Fork 19
fix: optimize domain reachability check in FederationValidationService #325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughOptimizations to federation validation: adds a guard in domain reachability checks to skip verification for the server's own domain, and restructures invite validation to only validate remote invites while skipping validation for local invites processed directly. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (1)packages/federation-sdk/src/services/invite.service.ts (1)
🔇 Additional comments (2)
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 #325 +/- ##
==========================================
- Coverage 52.04% 52.02% -0.02%
==========================================
Files 97 97
Lines 13153 13158 +5
==========================================
Hits 6845 6845
- Misses 6308 6313 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 2 files
When inviting a user from the local server, we were doing the federation validation of the domain which isn't necessary. This broke integration tests being run locally because the domain name resolved the the container's ip and when trying to reach <container's ip>:443 that port wasn't open since in docker, we use traefik to listen on that port on a different ip. This fix addresses the change introduced in #305 but also makes a prophylactic fix by avoiding domain checks on the local server.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.