Skip to content

CI: provisioning.test.ts fixed 360s timeout can be shorter than the download-retry worst case #91

Description

@mobileskyfi

Observed

user provisioning > background mode: custom user created and accessible via REST timed out at its fixed 360s harness timeout, on a narrow windows-x86 / provisioning.test.ts / stable dispatch (unrelated investigation into a separate SSH batch-login probe issue on windows-x86 (branch diag/ssh-second-probe-diagnostic): https://github.com/tikoci/quickchr/actions/runs/29116483756/job/86441059513

19:03:06.588  Downloading CHR 7.23.2 (x86)...
19:05:06.615    Download failed (attempt 1/3), retrying in 2s...
19:07:08.629    Download failed (attempt 2/3), retrying in 4s...
19:09:06.014  (fail) user provisioning > background mode: custom user created and accessible via REST [360001.58ms]
19:09:06.014    ^ this test timed out after 360000ms.
19:09:06.473  Downloading CHR 7.23.2 (x86)...        <- next test, same image
19:09:12.658    Saved (succeeded in 6s)

Root cause (grounded, not a TCG-hang)

This is not the #76 silent-hang class — the log is fully accounted for. downloadImage()
(src/lib/images.ts) retries 3× with a 120s AbortSignal.timeout per attempt and 2s/4s
backoff — worst case ~366s (120+2+120+4+120). This test's timeout is a fixed
360_000, i.e. shorter than the download's own worst-case retry budget. When two
attempts genuinely fail (ordinary transient network flakiness against
download.mikrotik.com — the very next test's download of the identical image
succeeded in 6s, so this isn't a systemic/version-specific problem), bun's own
per-test timeout SIGTERMs the test 6s before downloadImage()'s retry loop would have
thrown its own clean DOWNLOAD_FAILED error. The failure is diagnosable in this case only
because the preceding Downloading CHR .../Download failed (attempt N/3) lines happened to
be in the log — a test that reached this point without a slow download would give no clue at
all, just a bare timeout.

This is the same class of gap #89 (fix(ci): scale examples-smoke per-test timeout for TCG platforms, merged as #90) already fixed for examples-smoke.test.ts — its PER_TEST_TIMEOUT
is now derived from defaultBootTimeout() with headroom instead of a flat constant.
provisioning.test.ts still has 6 tests on the old flat 360_000 pattern (lines 150, 191,
224, 260, 351, 537 as of this writing), all equally exposed: any one of them can lose a race
against a slow-but-legitimately-retrying download and fail as an undiagnosable timeout instead
of a clean download error.

Done-when

Cross-refs: #89/#90 (sibling fix for examples-smoke), #76 (a different windows/macOS TCG
symptom — silent hang, not this).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3research / investigation — needs grounding firstarea:ciCI workflows, publish, verification matrixarea:provisioningfirst-boot provisioning, device-mode, licensebugSomething isn't workingci:slow-platform-flakeCI flakes on slow/TCG or contended runners — grouped series, share evidence across issuesplatform:windowsMikrosoft Windows specific issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions