Skip to content

fix(installer): Docker engine wait — 10 minutes, elapsed progress, named failure state - #440

Merged
shujaatTracebloc merged 4 commits into
fix/412-create-deadlinefrom
fix/413-docker-wait
Jul 27, 2026
Merged

fix(installer): Docker engine wait — 10 minutes, elapsed progress, named failure state#440
shujaatTracebloc merged 4 commits into
fix/412-create-deadlinefrom
fix/413-docker-wait

Conversation

@LukasWodka

@LukasWodka LukasWodka commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes the UZ Gent quick-win set: the Docker engine wait no longer gives up after 3 minutes. First-ever Docker Desktop starts on AV-heavy hospital laptops routinely take 5–10 minutes — the old cap converted a normal cold start into "Docker did not start in time. Re-run this script", i.e. a failed install and a manual re-paste.

Change

  • Wait bound 3 min → 10 min default, TB_DOCKER_WAIT_MIN override (same env-knob pattern as TB_CREATE_TIMEOUT_MIN from fix(installer): fail fast on k3d spawn failure; bound the create wait #439).
  • Spinner shows honest elapsed progress after the first minute ("4 min elapsed; a first start can take up to 10").
  • On expiry the failure names the observed state: Docker Desktop process exited (→ start it / fix its error window) vs. running-but-engine-down (→ tray guidance), instead of one generic retry line.
  • Pester content gates for the bound, override, progress copy, and state detection; manifest.sha256 regenerated.

Stacked on #439#438#437 — merge in that order; this branch contains all three.

Type

Bug fix

Test plan

Full Pester suite locally on pwsh 7.5 (CI invocation): 171 passed, 0 failed, 8 skipped (2 new). gen-manifest.sh --check clean.

🤖 Generated with Claude Code


Note

Low Risk
Installer-only wait UX and error copy in Install-DockerDesktop; no changes to credentials, cluster logic, or data handling.

Overview
Fixes #413 by changing how the Windows installer waits for Docker Desktop’s engine after launch.

The wait cap goes from ~3 minutes ($maxWait = 60 at 3s per poll) to 10 minutes by default, with TB_DOCKER_WAIT_MIN overriding the bound (same pattern as TB_CREATE_TIMEOUT_MIN). After the first minute, the spinner shows elapsed time and notes that a first start can take up to the configured limit.

On timeout, errors are split by observed state: if the Docker Desktop process has exited, messaging points at starting/fixing Docker (no “just wait longer” / wait-override hints, per #440); if the process is still running but docker info never succeeds, users get tray/WSL guidance plus the TB_DOCKER_WAIT_MIN hint.

Adds Pester content gates for the new wait behavior and updates scripts/manifest.sha256 for install-k8s.ps1.

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

…med 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>
@LukasWodka
LukasWodka requested a review from saadqbal as a code owner July 27, 2026 14:00
@LukasWodka LukasWodka self-assigned this Jul 27, 2026
@LukasWodka

Copy link
Copy Markdown
Contributor Author

bugbot run

Comment thread scripts/install-k8s.ps1
@LukasWodka

Copy link
Copy Markdown
Contributor Author

bugbot run

Comment thread scripts/install-k8s.ps1 Outdated
…#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>
@LukasWodka

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot 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 83e043d. Configure here.

@shujaatTracebloc
shujaatTracebloc merged commit 7d78fd3 into fix/412-create-deadline Jul 27, 2026
4 checks passed
@shujaatTracebloc
shujaatTracebloc deleted the fix/413-docker-wait branch July 27, 2026 15:06
LukasWodka added a commit that referenced this pull request Jul 27, 2026
…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 added a commit that referenced this pull request Jul 27, 2026
…447)

* fix(installer): fail fast on k3d spawn failure; bound the create wait (#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>

* fix(installer): Docker engine wait — 10 minutes, elapsed progress, named 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>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to 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.

2 participants