Repository navigation
test: resume and parallelize the WSL smoke host package downloads - #347436
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the WSL package-download resilience changes.
No open issues 🎉
What changed in this PR
This PR makes host-side package downloads for WSL smoke-test provisioning more resilient to slow or stalled Ubuntu mirror connections, including when rebuilding a cached distribution.
Changes:
- Extracts
Save-DebPackagesto download six packages concurrently, resume interrupted transfers, and back off when no progress is made. - Retains size and hash validation, removes the alternate-mirror fallback, and uses a deadline ten minutes after script startup before leaving unfinished packages to apt.
- Includes temporary proof-only throttling to exercise resumed downloads in CI, planned for removal before readiness.
| File | Description |
|---|---|
test/smoke/wslDevContainer.ps1 |
Replaces sequential package downloads with a parallel, resumable helper and a script-relative deadline. |
Review effort: Balanced
|
|
|
Proof: def 111 494890 (Windows x64 only, CI, Publish off) with the PROOF ONLY commit, which cuts every package's first fetch short after 3 s at 32 KB/s.
The PROOF ONLY commit is now dropped. The head is the single change commit.
|
2ecf4d9 to
1b39a92
Compare
The Azure Ubuntu mirror at times serves package files at under 100 KB/s or stalls on them. The host download gave each package three fresh attempts at 1 MB/s from byte 0, with archive.ubuntu.com as the last one, which answers 403 to the build agents. It then left large packages such as containerd and docker.io to apt, which kept the slow connection until the step's 15-minute timeout (494570, 494706). Download the packages in parallel, continue a stopped transfer from where it stopped on a fresh connection, back off only after an attempt that got no bytes, and give the host until 10 minutes after the script started. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1b39a92 to
cd7f879
Compare
The Windows x64 smoke step
Prepare WSL Dev Container smoke teststimed out in three product builds today while the Azure Ubuntu mirror was degraded (494568, which passed on a job retry, 494570 and 494706). It gates every Windows x64 artifact of an official build.Mechanism
wslDevContainer.ps1downloads the apt packages on the host before apt installs them in the distribution (#345873). While the mirror is degraded it serves some package files at under 100 KB/s, or stalls on them, while its index files stay fast. The host loop then:archive.ubuntu.comas the third attempt, which answers 403 to the build agents in every failing log;In 494706 the host got 32 packages, but containerd (28 MB) and docker.io (36 MB) failed all three attempts. apt in the distribution then fetched containerd at about 86 KB/s (5.5 min), and docker.io was still downloading when the step timed out.
Change
Save-DebPackagesreplaces the inline loop:--continue-at -) on a fresh connection, so reconnecting costs no bytes.archive.ubuntu.comis a dead fallback on the agents.Relation to #347367
#347367 caches the prepared distribution in the Azure Pipelines Windows x64 smoke job, so this download now runs only on a cache miss. On a miss it runs in
-Operation Prepare(20-minute step), and again in Setup if Prepare fails. Misses happen on the first jobs of each UTC day before the first save, on every branch whose script differs, and after any change to this script. This change makes both attempts resumable and parallel, and its 10-minute host deadline fits inside the Prepare step.Validation
A local harness serves 25 packages from a server that replays the failure modes in the logs: a 6 MB file at about 150 KB/s on every connection, a first connection cut halfway, a first-request 502, a first connection that stalls, and a first response with corrupt bytes. It loads
Save-DebPackagesfrom the script itself.On the real mirror, def 111 run 494890 (Windows x64 only) used a PROOF ONLY commit, since dropped, that cut every package's first fetch short after 3 s at 32 KB/s. On #347367's cache-miss path, 19 packages stopped partway and resumed, the host downloaded all 34 packages, and apt reported
Need to get 0 B/85.9 MB. Prepare took 123 s, and Setup then imported the prepared distribution in 12 s.