Skip to content

test: download the WSL smoke packages on the host - #345873

Merged
Bryan Chen (bryanchen-d) merged 3 commits into
mainfrom
copilot/vscode/wsl-smoke-host-debs
Nov 3, 2026
Merged

Bryan Chen (bryanchen-d) merged 3 commits into
mainfrom
copilot/vscode/wsl-smoke-host-debs

Conversation

@bryanchen-d

@bryanchen-d Bryan Chen (bryanchen-d) commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes Prepare WSL Dev Container smoke tests timing out on Windows, which has happened in every run since about 17:00 UTC today.

Mechanism

  • Since about 17:00 UTC, every run on 1ES ADO agents and GitHub runners has fetched the apt index files from azure.archive.ubuntu.com at 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.
  • The same agents download the rootfs and server on the Windows host at 90–167 MB/s. So the slow path is apt inside the distribution fetching pool files, not the agent's network.
  • apt never abandons a connection that keeps trickling. test: bound and retry apt in the WSL smoke setup #345598 bounded stalls (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

  • The distribution still runs apt-get update (bounded, --error-on=any). It then writes what apt-get install --print-uris resolves to the shared work folder.
  • The host downloads those packages. A transfer below 1 MB/s for 15 s is abandoned and retried on a fresh connection, then from archive.ubuntu.com. Each file's size and hash are checked against what apt reported.
  • The distribution copies the files into /var/cache/apt/archives and runs the same apt-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

  • Both bash blocks pass bash -n, and the script parses.
  • I ran the host download loop locally against the real mirror. containerd (28 MB) downloaded and verified in about 1 s. A missing package fell back to archive.ubuntu.com, then was left for apt.
  • def 111 Windows CI run 492481 on the first head (31afda2994), during the slowdown: Downloaded 34 packages on the host in 54 s, then Need 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.
  • def 111 Windows CI run 492492 on 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.
  • PR CI Windows / Electron-Smoke (shard 1/3) runs this step.

Authored with Copilot

Copilot AI balanced review requested due to automatic review settings November 3, 2026 18:11
@bryanchen-d

Copy link
Copy Markdown
Collaborator Author

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.

Co-authored with Copilot

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Base: ecf8b7ed Current: ebdf2376

No screenshot changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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

Comment thread test/smoke/wslDevContainer.ps1 Resolved
Comment thread test/smoke/wslDevContainer.ps1 Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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

Comment thread test/smoke/wslDevContainer.ps1 Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the host-side WSL smoke-test package download changes.

No open issues 🎉

1 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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the change moving WSL smoke-test package downloads to the Windows host.

No open issues 🎉

Review effort: Balanced

@bryanchen-d
Bryan Chen (bryanchen-d) marked this pull request as ready for review November 3, 2026 19:39
@bryanchen-d
Bryan Chen (bryanchen-d) enabled auto-merge (squash) November 3, 2026 19:39
@bryanchen-d
Bryan Chen (bryanchen-d) marked this pull request as draft November 3, 2026 19:39
auto-merge was automatically disabled November 3, 2026 19:39

Pull request was converted to draft

@bryanchen-d
Bryan Chen (bryanchen-d) marked this pull request as ready for review November 3, 2026 20:02
@bryanchen-d
Bryan Chen (bryanchen-d) enabled auto-merge (squash) November 3, 2026 20:02
@bryanchen-d
Bryan Chen (bryanchen-d) merged commit d45a10c into main Nov 3, 2026
56 checks passed
@bryanchen-d
Bryan Chen (bryanchen-d) deleted the copilot/vscode/wsl-smoke-host-debs branch November 3, 2026 21:19
@vs-code-engineering vs-code-engineering Bot added this to the 1.146.0 milestone Nov 3, 2026
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.

4 participants