-
Notifications
You must be signed in to change notification settings - Fork 4
fix(deepnote-server): Handle disabled IPv6 support #192
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
fix(deepnote-server): Handle disabled IPv6 support #192
Conversation
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
📝 WalkthroughWalkthroughThe isPortAvailable function now wraps the IPv6 (::1) port check in its own try/catch. IPv4 (127.0.0.1) is checked first; if that fails, the function returns false. If IPv4 succeeds, the IPv6 check runs inside a dedicated try/catch: an EAFNOSUPPORT error is treated as “IPv6 unsupported” (a debug is logged) and the function returns true; any other error logs a warning and the function returns false. No public API or exported declarations changed. Sequence Diagram(s)sequenceDiagram
participant Caller
participant isPortAvailable
participant Logger
Caller->>isPortAvailable: request port availability
isPortAvailable->>isPortAvailable: check 127.0.0.1 (IPv4)
alt IPv4 bind fails
isPortAvailable->>Caller: return false
else IPv4 bind succeeds
isPortAvailable->>isPortAvailable: check ::1 (IPv6) within its own try/catch
alt IPv6 bind succeeds
isPortAvailable->>Caller: return true
else IPv6 throws EAFNOSUPPORT
Note right of isPortAvailable `#e8f5e9`: IPv6 unsupported (EAFNOSUPPORT)
isPortAvailable->>Logger: debug "IPv6 is not supported on this system"
isPortAvailable->>Caller: return true
else IPv6 throws other error
Note right of isPortAvailable `#fff3e0`: Unexpected IPv6 error
isPortAvailable->>Logger: warn "Failed to check IPv6 port availability"
isPortAvailable->>Caller: return false
end
end
Possibly related PRs
Suggested reviewers
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)src/kernels/**/*.ts📄 CodeRabbit inference engine (.github/instructions/kernel.instructions.md)
Files:
🧬 Code graph analysis (1)src/kernels/deepnote/deepnoteServerStarter.node.ts (2)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #192 +/- ##
=====================================
Coverage 73% 73%
=====================================
Files 577 577
Lines 47626 47663 +37
Branches 5596 5597 +1
=====================================
+ Hits 34902 34939 +37
Misses 10887 10887
Partials 1837 1837
🚀 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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/kernels/deepnote/deepnoteServerStarter.node.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/kernels/**/*.ts
📄 CodeRabbit inference engine (.github/instructions/kernel.instructions.md)
src/kernels/**/*.ts: Use event-driven updates (EventEmitter) for state changes
Monitor and dispose pending promises to prevent leaks during teardown
Use WeakRef/weak references for notebook/object backreferences to avoid memory leaks
Respect CancellationToken in all async operations
Files:
src/kernels/deepnote/deepnoteServerStarter.node.ts
🧬 Code graph analysis (1)
src/kernels/deepnote/deepnoteServerStarter.node.ts (1)
src/platform/logging/index.ts (1)
logger(35-48)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build & Test
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
Summary by CodeRabbit
Bug Fixes
Tests