fix(onboard): surface NEMOCLAW_DASHBOARD_PORT/GATEWAY_PORT override in preflight error#2578
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughPreflight port validation now attaches an ChangesPreflight + Test
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
✨ Thanks for submitting this PR that identifies a bug in the onboard process and proposes a change to improve the user experience by surfacing port override options. This proposes an enhancement to the NemoClaw CLI to allow specifying alternative ports, which will improve the usability of the sandbox resource. Related open issues: |
7365139 to
556457e
Compare
…n preflight error When `nemoclaw onboard` aborts at preflight because port 8080 or 18789 is held by an unrelated process, the error currently lists the conflicting process and tells the user to stop it (`sudo kill <PID>`) — but offers no way to keep the conflicting process and onboard on a different port. The override env vars NEMOCLAW_GATEWAY_PORT / NEMOCLAW_DASHBOARD_PORT have always been honored by parsePort() in src/lib/ports.ts; they were just undocumented and undiscoverable. Thread the env-var name through the requiredPorts list and append a "rerun with a different port" hint immediately before the existing Detail line. Users blocked by an unrelated dev server on 18789 can now copy-paste NEMOCLAW_DASHBOARD_PORT=<N> nemoclaw onboard without leaving the wizard. Lock the new hint in via the existing port8080-conflict E2E so a future refactor of the error block doesn't silently regress discoverability. Closes NVIDIA#2497. Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
556457e to
37e0d02
Compare
ericksoa
left a comment
There was a problem hiding this comment.
Reviewed current head 37e0d02. This is a narrow preflight failure-path change: it only threads the existing port override env var names into the already-failing port-unavailable diagnostic and adds E2E coverage for the new hint. The existing NEMOCLAW_GATEWAY_PORT/NEMOCLAW_DASHBOARD_PORT parsing remains unchanged, and the success path for gateway start, dashboard allocation, and sandbox creation is not modified.
Summary
Closes #2497.
When
nemoclaw onboardaborts at preflight because port 8080 or 18789 is held by an unrelated process, the error currently lists the conflicting process and tells the user to stop it (sudo kill <PID>) — but offers no way to keep the conflicting process and onboard on a different port. The override env varsNEMOCLAW_GATEWAY_PORTandNEMOCLAW_DASHBOARD_PORThave always been honored byparsePort()in src/lib/ports.ts; they were just undocumented and undiscoverable from the error message.Problem
@BryanTegomoh hit this on a clean install where an unrelated dev server was already on 18789. Their report (#2497) lists three acceptable fixes; this PR implements option 2 ("Honor a
NEMOCLAW_DASHBOARD_PORTenv var and document it in the preflight error") — the smallest possible change that unblocks the user, since the env var already works and just needs surfacing.The original error path (after my change):
The new "Or rerun with a different port" hint is generated from a per-port
envVarfield threaded through the existingrequiredPortslist, so the error message picks the correct override variable for each port (NEMOCLAW_GATEWAY_PORTfor 8080 /NEMOCLAW_DASHBOARD_PORTfor 18789) without any string matching.Test plan
npx vitest run --project cli --testTimeout=180000 test/onboard.test.ts src/lib/preflight.test.ts).test/e2e/e2e-cloud-experimental/test-port8080-conflict.shto assert the newNEMOCLAW_GATEWAY_PORT=<port> nemoclaw onboardhint appears in onboard output, locking the behavior in for future refactors.NEMOCLAW_DASHBOARD_PORT=29999 noderesolvesDASHBOARD_PORTto 29999 viaparsePort()(env var was already wired — only the error-message discoverability was missing).Signed-off-by: latenighthackathon latenighthackathon@users.noreply.github.com
Summary by CodeRabbit
New Features
Tests