Repository navigation
test: download the WSL smoke packages on the host - #345873
Conversation
|
Ladislau Szomoru (@lszomoru) Christof Marti (@chrmarti) FYI: since about 17:00 UTC the Azure mirror serves the WSL smoke packages at about 120 kB/s on every agent, which fails the Windows smoke WSL step (main CI 492453, 492470). This moves the package download to the host, with a slow-transfer abort and a mirror fallback.
|
|
Base:
|
There was a problem hiding this comment.
🟡 Changes recommended
Host downloads can exhaust the setup timeout before apt runs, and a stale curl exit code can fail the step even when apt fallback succeeds.
2 open issues
What changed in this PR
This PR moves WSL smoke-test package downloads to the Windows host to avoid slow downloads inside the distribution, while keeping apt responsible for installation.
Changes:
- Retains bounded apt index updates and exports resolved package URLs.
- Adds host downloads with slow-transfer detection, retries, mirror fallback, and size/hash validation.
- Copies verified packages into apt’s cache, leaving missing packages for apt to download.
| File | Description |
|---|---|
test/smoke/wslDevContainer.ps1 |
Splits package preparation into apt resolution, host downloads, and installation inside WSL. |
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Curl’s internal retries reset the timeout per attempt, allowing downloads to exceed the four-minute host budget and consume time reserved for apt and remaining setup.
1 open issue
2 resolved since last review
Review effort: Balanced
Since about 17:00 UTC the Azure Ubuntu mirror has served package files to the WSL distribution at about 120 KB/s on every CI agent, while its index files and the host's own downloads stay fast, so the 86 MB of packages ran past the step's 720 second budget in every run. apt never abandons such a connection. The host now downloads the packages apt resolves, abandoning a transfer below 1 MB/s for 15 seconds and retrying it on a fresh connection, then on the main Ubuntu archive, and apt installs them after checking them against the index. Packages the host could not get are left to apt. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…failing the step Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
curl's own retries reset --max-time for every attempt, so they could run past the host download bound. Retry in the loop instead, which recomputes the remaining time for every attempt. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
890f3dc to
f9c4fbd
Compare
Pull request was converted to draft

Fixes
Prepare WSL Dev Container smoke teststiming out on Windows, which has happened in every run since about 17:00 UTC today.Mechanism
azure.archive.ubuntu.comat about 9 MB/s, then the package files at about 120 kB/s:Fetched 85.9 MB in 11min 45s (122 kB/s). The step then hits its 720 s budget before unpacking. Hits so far: main CI 492453 and 492470, plus both attempts of PR run 41685374025.Acquire::http::Timeout) but deliberately gave a slow, progressing download the whole budget, and at 120 kB/s that's no longer enough for 86 MB.Fix
apt-get update(bounded,--error-on=any). It then writes whatapt-get install --print-urisresolves to the shared work folder.archive.ubuntu.com. Each file's size and hash are checked against what apt reported./var/cache/apt/archivesand runs the sameapt-get install. apt checks every file against the index again and downloads anything the host couldn't get, so the worst case is the old behavior.Validation
bash -n, and the script parses.archive.ubuntu.com, then was left for apt.31afda2994), during the slowdown:Downloaded 34 packages on the hostin 54 s, thenNeed to get 0 B/85.9 MB of archives, and the step passed in 153 s. Main CI 492453 and 492470 in the same window took 11 min 45 s at 122 kB/s and failed.e7cba2d0af(4-minute host bound, exit-code reset): 34 packages on the host,Need to get 0 B, step passed in 110 s. The current head only moves the retries from curl into the loop.Windows / Electron-Smoke (shard 1/3)runs this step.