fix(onboard): use 127.0.0.1 instead of localhost for local inference detection#176
fix(onboard): use 127.0.0.1 instead of localhost for local inference detection#176dumko2001 wants to merge 2 commits into
Conversation
|
I've looked at the changes and see that this PR updates the local inference detection to use 127.0.0.1 instead of localhost, which should improve reliability across different environments and network configurations. |
|
Hi @dumko2001! The localhost vs 127.0.0.1 distinction is one of those subtle things that can really bite you. We'd like to consider this — please rebase onto the latest main so we can give it a proper review. A lot has changed upstream. |
aed6e2a to
abc1036
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (4)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughSwitched local inference health-check and probe endpoints from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
bin/lib/onboard.js (1)
549-556: Unify endpoint wording across the onboarding flow.Line 549 and Line 556 now show
127.0.0.1, but Line 652, Line 665, and Line 673 still printlocalhost. Keep these consistent to reduce troubleshooting ambiguity.♻️ Suggested consistency patch
- console.log(" ✓ Using Ollama on localhost:11434"); + console.log(" ✓ Using Ollama on 127.0.0.1:11434"); ... - console.log(" ✓ Using Ollama on localhost:11434"); + console.log(" ✓ Using Ollama on 127.0.0.1:11434"); ... - console.log(" ✓ Using existing vLLM on localhost:8000"); + console.log(" ✓ Using existing vLLM on 127.0.0.1:8000");🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@bin/lib/onboard.js` around lines 549 - 556, The onboarding labels use mixed hostnames ("127.0.0.1" in some labels and "localhost" in others); update the other label strings to match the chosen canonical form (use "127.0.0.1" per recent edits) so wording is consistent. Search for the label construction sites where options are pushed (look for options.push and labels that mention "localhost") and replace "localhost" with "127.0.0.1", preserving surrounding text, experimental tags, and the suggested/running suffix logic (refer to the ollamaRunning, vllmRunning and EXPERIMENTAL usage to ensure behavior and conditional suffixes remain unchanged).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@bin/lib/onboard.js`:
- Around line 549-556: The onboarding labels use mixed hostnames ("127.0.0.1" in
some labels and "localhost" in others); update the other label strings to match
the chosen canonical form (use "127.0.0.1" per recent edits) so wording is
consistent. Search for the label construction sites where options are pushed
(look for options.push and labels that mention "localhost") and replace
"localhost" with "127.0.0.1", preserving surrounding text, experimental tags,
and the suggested/running suffix logic (refer to the ollamaRunning, vllmRunning
and EXPERIMENTAL usage to ensure behavior and conditional suffixes remain
unchanged).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ce39aac5-cf17-4f4c-884d-5f93628e4341
📒 Files selected for processing (1)
bin/lib/onboard.js
…d policy identity clearing (NVIDIA#176)
brandonpelfrey
left a comment
There was a problem hiding this comment.
Thanks for the cleanup here. I found one blocking issue:
-
NIM path/tests are now inconsistent with the stated rationale
This PR changes local host probes fromlocalhostto127.0.0.1inbin/lib/nim.js, but the accompanying tests for that module were not updated and still asserthttp://localhost:...intest/nim.test.js. More importantly, this means we are now applying the IPv4-only change to NIM health checks too, even though the PR description is specifically about local inference detection for Ollama/vLLM onboarding.Please either:
- update
test/nim.test.jsand clarify in the PR description that NIM health/status probes are intentionally being changed too, or - revert the
bin/lib/nim.jschanges and keep this PR scoped to the onboarding/local-inference paths only.
As-is, the patch looks partially applied/internally inconsistent.
- update
|
addressing the comments here |
Rationale
Using
localhostcan sometimes resolve to IPv6 addresses or behave inconsistently across different environments and network configurations.Changes
Switched to the explicit IPv4 loopback address
127.0.0.1for local inference service detection to improve reliability.Verification Results
npm test.Leading Standards
This PR follows the project's 'First Principles' approach, prioritizing deterministic behavior and zero-trust security defaults.
Summary by CodeRabbit