Skip to content

fix(installer): honest progress + runnable remedies for WSL GPU setup (#415) - #449

Merged
shujaatTracebloc merged 1 commit into
developfrom
fix/415-gpu-toolkit-wsl
Jul 28, 2026
Merged

fix(installer): honest progress + runnable remedies for WSL GPU setup (#415)#449
shujaatTracebloc merged 1 commit into
developfrom
fix/415-gpu-toolkit-wsl

Conversation

@shujaatTracebloc

@shujaatTraceblocshujaatTracebloc commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Closes#415.

Problem

On a GPU machine the NVIDIA container toolkit setup inside WSL2 ran entirely through Log (which writes to the log file only), so the console sat blank through the 30s WSL probe, the multi-hundred-MB Ubuntu install, and the 180s toolkit install. On timeout it printed a vague "You can set it up manually inside WSL later" / "GPU setup may need manual attention" with no actual commands.

Fix

  • Wait-JobWithProgress — waits on a background job with a spinner + elapsed / timeout heartbeat, bounded, stops the job best-effort on timeout. Every long GPU sub-step (WSL probe, Ubuntu install, toolkit install, verify) now goes through it, so no window is silent for more than ~2s.
  • Show-GpuManualRemedy — prints copy-pastable remedy commands (mirroring the in-WSL steps, carrying the same --tlsv1.2 --connect-timeout 30 --max-time 30 floor as the automated path) and a tracebloc doctor follow-up. Called on every timeout/failure branch.
  • The Ubuntu install is now a progress-tracked job instead of a silent cmd /c "wsl --install -d Ubuntu" | Out-Null.
  • Visible Info intro (optional; CPU mode works either way) + Ok on success; the vague dead-end copy is gone.
  • Extracted the shared braille spinner into $script:SpinnerFrames (reused by Wait-ProcessWithDeadline).

GPU setup stays in Step 1 (before New-K3dCluster) because the --gpus flag must be decided there; moving it post-install would force cluster recreation — the exact churn #431 warns about. It remains non-fatal, so CPU mode always completes cleanly.

Acceptance criteria

  • No silent window >10s during GPU setup (heartbeat every 2s + visible intro)
  • Timeout/failure output contains runnable remedy commands (+ tracebloc doctor)
  • Non-blocking consideration addressed (already non-fatal; rationale for staying in Step 1 documented)

Tests

11 new Pester tests (Wait-JobWithProgress, Show-GpuManualRemedy, Install-NvidiaContainerToolkit).

Verified locally (CI-identical):

  • Pester full suite: 186 passed, 0 failed, 8 skipped (Windows-only)
  • PSScriptAnalyzer: 0 Error-severity
  • check-style.sh: clean
  • manifest verification: ✔

Note

Low Risk
Installer-only UX and error messaging for best-effort GPU setup; behavior remains non-fatal with CPU fallback, covered by new Pester tests.

Overview
Improves Windows installer UX for optional NVIDIA container toolkit setup in WSL2 (#415): long steps no longer leave the console silent, and failures print actionable recovery steps instead of vague hints.

Wait-JobWithProgress polls background jobs with a shared braille spinner and elapsed / timeout line (~2s heartbeat), stops the job on timeout, and replaces bare Wait-Job for WSL list, Ubuntu install, toolkit install, and verify. Spinner frames move to $script:SpinnerFrames (also used by Wait-ProcessWithDeadline).

Show-GpuManualRemedy prints copy-pastable WSL commands (matching the automated path) plus tracebloc doctor on timeout/failure branches. Ubuntu install runs in a progress-tracked job (600s cap) instead of silent cmd /c | Out-Null. Visible Info/Ok lines replace log-only progress; GPU setup stays non-fatal (CPU fallback).

Pester tests lock the new helpers and GPU flow contracts; manifest.sha256 updated for install-k8s.ps1.

Reviewed by Cursor Bugbot for commit b83c7b1. Bugbot is set up for automated code reviews on this repo. Configure here.

…#415)
The NVIDIA container toolkit setup ran entirely through Log (file-only),
so the console sat blank through the 30s WSL probe, the multi-hundred-MB
Ubuntu install, and the 180s toolkit install — and on failure printed a
vague "set it up manually inside WSL later" with no actual commands.
- Add Wait-JobWithProgress: spinner + elapsed/timeout heartbeat while a
background job runs, bounded, stops the job on timeout. No GPU sub-step
now goes silent for more than ~2s.
- Add Show-GpuManualRemedy: copy-pastable install commands (same
--tlsv1.2 + connect/max-time floor as the automated path) plus a
`tracebloc doctor` follow-up, printed on every timeout/failure branch.
- Ubuntu install is now a progress-tracked job instead of a silent
`cmd /c ... | Out-Null`.
- Visible Info intro (optional; CPU mode works either way) + Ok on
success; drop the vague dead-end copy.
- Extract shared spinner frames ($script:SpinnerFrames).
- 11 Pester tests.
Acceptance: no silent window >10s; timeout output carries runnable
remedies. Kept in Step 1 (the --gpus flag must be decided before
New-K3dCluster; moving it would force cluster recreation, #431).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shujaatTraceblocshujaatTracebloc self-assigned this Jul 28, 2026
@shujaatTracebloc
shujaatTracebloc marked this pull request as draft July 28, 2026 11:55
@shujaatTracebloc
shujaatTracebloc marked this pull request as ready for review July 28, 2026 13:28
@shujaatTracebloc
shujaatTracebloc merged commit aa43b7a into developJul 28, 2026
39 checks passed
@shujaatTracebloc
shujaatTracebloc deleted the fix/415-gpu-toolkit-wsl branch July 28, 2026 13:30
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@shujaatTracebloc@saadqbal@LukasWodka@divyasinghds