Skip to content

fix(installer): re-land #412 + #413 onto develop (follow-up to #446) - #447

Merged
LukasWodka merged 2 commits into
developfrom
fix/re-land-412-413-develop
Jul 27, 2026
Merged

fix(installer): re-land #412 + #413 onto develop (follow-up to #446)#447
LukasWodka merged 2 commits into
developfrom
fix/re-land-412-413-develop

Conversation

@LukasWodka

@LukasWodkaLukasWodka commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Re-lands the two stack members whose squash-merges went into already-merged feature branches instead of develop (the stacked-PR merge-button trap — bases were unprotected):

Both are the exact Bugbot-clean squashes cherry-picked from the orphaned branches, on top of #446 (the #410 re-land).

Merge order — read first

Draft on purpose. Merge #446 first (base: develop). I'll then retarget this PR to develop and mark it ready — that also makes the closes #412 / closes #413 keywords effective. Do not merge while the base is the feature branch.

Type

Bug fix (re-land)

Test plan

Full Pester suite at this tip: 175 passed, 0 failed, 8 skipped. gen-manifest.sh --check clean. Content identical to the already-Bugbot-verified #439/#440 squashes.

🤖 Generated with Claude Code


Note

Low Risk
Installer-only PowerShell changes with new env overrides and Pester tests; no auth, data, or production runtime paths affected.

Overview
Hardens the Windows install-k8s.ps1 installer around Docker Desktop and k3d cluster create so slow or broken runs fail with actionable messages instead of hanging or leaving a bad state.

Docker engine wait (#413): Default wait rises from ~3 to 10 minutes (TB_DOCKER_WAIT_MIN). The spinner shows elapsed time after the first minute. On timeout, errors distinguish Docker Desktop exited vs still running but engine not ready, with matching hints (no slow-start advice when the process is dead).

k3d create (#412 / #426): New Wait-ProcessWithDeadline wraps the create spinner with a 15-minute bound (TB_CREATE_TIMEOUT_MIN), kills the process on expiry, tails k3d logs, and deletes a partial cluster before failing so the next run does not reuse a half-created environment. Start-Process uses -ErrorAction Stop so a failed spawn errors immediately instead of spinning on a null process.

Pester coverage and scripts/manifest.sha256 are updated for the changed script.

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

@LukasWodkaLukasWodka self-assigned this Jul 27, 2026
@LukasWodka

Copy link
Copy Markdown
ContributorAuthor

bugbot run

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit b5b5db9. Configure here.

Base automatically changed from fix/410-pin-k3d-helm-develop to developJuly 27, 2026 15:20
LukasWodkaand others added 2 commits July 27, 2026 17:24
…#439)
* fix(installer): fail fast on k3d spawn failure; bound the create wait (#412, #426 Windows half)
Two fixes to New-K3dCluster's create path, both observed live:
1. Start-Process failure ('%1 is not a valid Win32 application' from a
broken k3d.exe) is non-terminating by default, leaving $k3dProc null —
and 'while (-not $null.HasExited)' is always true, so the installer
spun 'Creating compute environment...' forever over a dead install.
The spawn now runs under -ErrorAction Stop in a try/catch that cleans
up the temp logs + proxy config and fails with the real exception,
the log path, and a remedy.
2. k3d cluster create --wait has no timeout of its own, so a stalled
image pull spun the spinner indefinitely. The wait is now bounded
(15 min default, TB_CREATE_TIMEOUT_MIN override): on expiry the
process is killed, the last stderr lines and the install-log path are
printed, and the install fails loudly. Extracted as
Wait-ProcessWithDeadline so the deadline/kill path is unit-tested.
Closes#412. Windows half of #426 (the bash half — k3d create + helm
timeouts in cluster.sh / install-client-helm.sh — follows separately).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(installer): remove the partial cluster when the create wait times out (Bugbot #439)
Killing k3d mid --wait skips its own rollback, so the timeout path left
a half-created cluster behind — and the next run's reuse path would see
serversRunning > 0 and print 'Compute environment already running' over
a broken environment. The timeout path now deletes the partial cluster
(bounded at 2 min via Wait-ProcessWithDeadline) before failing, and
tells the operator the exact manual command if the delete itself fails.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…med failure state (#440)
* fix(installer): Docker engine wait — 10 minutes, elapsed progress, named failure state (#413)
A first-ever Docker Desktop start on AV-heavy corporate machines
routinely needs 5-10 minutes (WSL bootstrap, image unpack). The old
3-minute cap turned a normal cold start into a failed install plus a
manual re-paste of the one-liner — observed as a recurring wait-then-
re-run loop on hospital installs.
- Wait bound: 3 min -> 10 min default, TB_DOCKER_WAIT_MIN override.
- After the first minute the spinner shows elapsed minutes and the
expected worst case, so the wait doesn't read as a hang.
- On expiry the failure names the observed state: Docker Desktop
process gone (start it / fix its error window) vs. running with the
engine still down (tray-icon guidance) - instead of one generic line.
Closes#413
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(installer): exited-Docker path drops the slow-start advice (Bugbot #440)
When Docker Desktop's process has exited, 'a first start can be slow'
and the TB_DOCKER_WAIT_MIN hint contradict the diagnosis and steer
operators toward raising the wait instead of restarting/fixing the
crash. The slow-start reassurance + override hint now print only on
the engine-still-starting path; the exited path fails with its own
start-and-fix remedy.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@LukasWodka
LukasWodkaforce-pushed the fix/re-land-412-413-develop branch from b5b5db9 to b219ebfCompareJuly 27, 2026 15:24
@LukasWodka
LukasWodka marked this pull request as ready for review July 27, 2026 15:24
@LukasWodka

Copy link
Copy Markdown
ContributorAuthor

bugbot run

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.

3 participants

@LukasWodka@shujaatTracebloc@divyasinghds