fix(onboard): stream OpenShell upgrade progress instead of a silent wait (#4431)#4529
Conversation
…ait (NVIDIA#4431) runOpenshellInstall captured install-openshell.sh stdout/stderr into a buffer that was only printed on failure, so a successful in-onboard OpenShell upgrade sat silent for the whole download/verify (~145s in the report). Switch the spawn to stdio inherit so the script progress lines stream live, and have install-openshell.sh show a curl progress bar when interactive plus a Downloading marker so the slow release download is not a silent gap. Keeps runOpenshellInstall synchronous, so no async change ripples into the onboard entrypoint. Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
📝 WalkthroughWalkthroughThis PR fixes the OpenShell upgrade hang by enabling live progress output during installation. The child process stdio is switched from buffering to terminal inheritance, allowing the install script's progress messages to stream to the user in real time. The shell script is enhanced with conditional curl progress bar display based on terminal interactivity. Test coverage validates the inherited stdio configuration and error handling. ChangesOpenShell Installation Progress Streaming
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 detailed PR about streaming OpenShell upgrade progress. This proposes a code change to make the upgrade process more transparent for users. Related open issues: |
Summary
runOpenshellInstallnow streamsscripts/install-openshell.shoutput live during the in-onboard OpenShell upgrade, so the upgrade reports progress instead of going quiet between theUpgrading...line and completion. Reported by NV QA.Related Issue
Closes #4431
Problem
When
nemoclaw onboardfinds an installed OpenShell below the blueprint minimum, it runsscripts/install-openshell.shto upgrade.runOpenshellInstall(src/lib/onboard/openshell-pin.ts) spawned that script withstdio: ["ignore", "pipe", "pipe"], which buffers stdout/stderr and only prints the buffer when the script exits non-zero. On a successful upgrade the buffer is discarded, so afteropenshell X.Y.Z is below minimum required version. Upgrading...no further output reaches the terminal for the entire download and checksum step (about 145s in the report).download_with_curlcompounds it:curl -fsSLsuppresses the progress meter via-s, so the release download is silent even once the script's stream is surfaced.Changes
src/lib/onboard/openshell-pin.ts: spawninstall-openshell.shwithstdio: ["ignore", "inherit", "inherit"]so itsinfo()progress lines reach the terminal as they are emitted. The call stays synchronous, so no async change propagates into the onboard entry point, and the failure path no longer needs to re-print a captured buffer because the output has already streamed.scripts/install-openshell.sh: print aDownloading OpenShell release assets...line before the download dispatch so thegh release downloadpath is not silent either.download_with_curlnow passes--progress-barwhen stdout or stderr is a terminal, falling back to-sS(errors only) when non-interactive so CI logs stay clean.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Ran: new
test/onboard-openshell-install-stream.test.tsconfirmsrunOpenshellInstallspawns with inherited stdio, no longer pipes or buffers, and returns a not-installed result without throwing on a non-zero exit; existing OpenShell suites pass (onboard-openshell-version,install-openshell-version-check,install-openshell-upgrade-prompt,resolve-openshell), 54/54; script behavior verified with a stubbedcurl, where a non-interactive run issuescurl -fL -sS ...and a pty-backed run issuescurl -fL --progress-bar ...;bash -n scripts/install-openshell.sh,npx biome check, andnpm run typecheck:cliclean.Signed-off-by: latenighthackathon latenighthackathon@users.noreply.github.com