Repository navigation
test: bound and retry apt in the WSL smoke setup - #345598
Conversation
|
Ladislau Szomoru (@lszomoru) Christof Marti (@chrmarti) FYI. This bounds and retries the apt step in
|
There was a problem hiding this comment.
🟢 Approval recommended
The WSL Dev Container smoke-test setup changes have no active review issues.
No open issues 🎉
What changed in this PR
Improves reliability of the WSL Dev Container smoke-test setup by bounding and retrying apt operations when the Azure Ubuntu mirror stalls or fails.
Changes:
- Makes failed package-index fetches fail the update attempt.
- Retries index updates and download-only installs up to three times, with respective 60- and 100-second limits.
- Raises the WSL command timeout from 300 to 600 seconds to accommodate retries before installation from the package cache.
| File | Description |
|---|---|
test/smoke/wslDevContainer.ps1 |
Adds bounded apt retries, separates downloading from installation, and extends the setup timeout. |
Review effort: Balanced
The Azure Ubuntu mirror usually serves the WSL smoke packages in 2-17 seconds, but a connection to it can fail or crawl for minutes. apt has no minimum transfer speed, so a crawling download ran past the 300 second command timeout (2 PR CI failures in 48h), and apt-get update only warns when it can't fetch the indexes, so the install then failed to find docker.io (main CI 491631). Bound the index update (now failing on any fetch error) and the package download, and retry each on fresh connections. A retried download resumes partial files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… attempts This PR's own CI hit the slow case: the indexes came at 8 MB/s, but packages came at about 250 KB/s on every connection, so fresh connections alone don't help. Each bounded attempt keeps completed packages and resumes the partial one, so allow 5 download attempts and a 720 second budget for the step. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… budget Instead of a hard per-attempt wall clock, which restarted a download that was progressing at about 250 KB/s, fail only a connection that stops sending data (Acquire::http::Timeout 30) and retry the download on error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2e6ed9a to
77d431d
Compare
* test: bound and retry apt in the WSL smoke setup The Azure Ubuntu mirror usually serves the WSL smoke packages in 2-17 seconds, but a connection to it can fail or crawl for minutes. apt has no minimum transfer speed, so a crawling download ran past the 300 second command timeout (2 PR CI failures in 48h), and apt-get update only warns when it can't fetch the indexes, so the install then failed to find docker.io (main CI 491631). Bound the index update (now failing on any fetch error) and the package download, and retry each on fresh connections. A retried download resumes partial files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: allow a slow mirror to finish the WSL smoke apt download across attempts This PR's own CI hit the slow case: the indexes came at 8 MB/s, but packages came at about 250 KB/s on every connection, so fresh connections alone don't help. Each bounded attempt keeps completed packages and resumes the partial one, so allow 5 download attempts and a 720 second budget for the step. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: let a slow but progressing WSL smoke apt download use the whole budget Instead of a hard per-attempt wall clock, which restarted a download that was progressing at about 250 KB/s, fail only a connection that stops sending data (Acquire::http::Timeout 30) and retry the download on error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: retain Copilot identity for edit-survival telemetry (#345691) Capture the originating account tracking ID for file tools and preserve it in host edit-source state until delayed telemetry emission. Keep different accounts separate without exposing identity in protocol markers or source keys. Fixes microsoft/vscode-internalbacklog#10569 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Bump version to 1.145.1 Update Copilot Chat's VS Code engine requirement while retaining its 0.73.0 package version. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert "Bump version to 1.145.1" This reverts commit 2dac9e3. * test: bound and retry apt in the WSL smoke setup (#345598) * test: bound and retry apt in the WSL smoke setup The Azure Ubuntu mirror usually serves the WSL smoke packages in 2-17 seconds, but a connection to it can fail or crawl for minutes. apt has no minimum transfer speed, so a crawling download ran past the 300 second command timeout (2 PR CI failures in 48h), and apt-get update only warns when it can't fetch the indexes, so the install then failed to find docker.io (main CI 491631). Bound the index update (now failing on any fetch error) and the package download, and retry each on fresh connections. A retried download resumes partial files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: allow a slow mirror to finish the WSL smoke apt download across attempts This PR's own CI hit the slow case: the indexes came at 8 MB/s, but packages came at about 250 KB/s on every connection, so fresh connections alone don't help. Each bounded attempt keeps completed packages and resumes the partial one, so allow 5 download attempts and a 720 second budget for the step. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: let a slow but progressing WSL smoke apt download use the whole budget Instead of a hard per-attempt wall clock, which restarted a download that was progressing at about 250 KB/s, fail only a connection that stops sending data (Acquire::http::Timeout 30) and retry the download on error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Bryan Chen <41454397+bryanchen-d@users.noreply.github.com>
Fixes a flaky
Prepare WSL Dev Container smoke testsstep on Windows (PR CIWindows / Electron-Smoke (shard 1/3)and def 111 Windows smoke).Mechanism
docker.ioand a few packages inside the WSL distro from the Azure Ubuntu mirror (test: use the Azure Ubuntu mirror in the WSL smoke setup #343768). Normally the whole package download takes 2-17 seconds (24 green PR CI jobs sampled over the last 48h).Invoke-Wsl's 300 second timeout. That happened in 2 PR CI runs in the last 48h, both stuck inapt-get install(containerd28 MB took about 3 minutes in run 41482962880, withIgn:retries in run 41251126966).apt-get updateonly warns (W: Failed to fetch … Could not connect to azure.archive.ubuntu.com) and exits 0. The install then fails withE: Unable to locate package docker.io(def 111 main CI 491631).Fix
apt-get update --error-on=any, so a failed index fetch fails the attempt instead of being ignored.Acquire::http::Timeout "30": a connection that stops sending data fails after 30s, and apt retries it (Acquire::Retries "5"). There is no wall clock on the download itself, so a slow but progressing download gets the whole step budget. The download (--download-only) and a--error-on=anyindex update (bounded at 45s per attempt) are each retried up to 3 times on error. The finalapt-get installinstalls from the local cache.Invoke-Wslbudget goes from 300 to 720 seconds to fit the bounded retries. A healthy run still takes seconds.Validation
bash -n.103334e962) that also refuses the first index update and throttles the first package download to 64 KB/s.Prepare WSL Dev Container smoke testssucceeded. With--error-on=any, the refused update failed attempt 1 instead of warning, and attempt 2 fetched the indexes in 5s. The throttled download ran past 100s on attempt 1, and attempt 2 resumed and finished the remaining 73.4 MB in 1s. Docker then started, and the rest of the setup passed.5904161ba6). It refuses the first index update and throttles the whole package download to 256 KB/s. The step succeeded: attempt 1 of the update failed and attempt 2 passed, thenFetched 79.9 MB in 4min 5s (326 kB/s)completed, which would not fit in the old 300s budget.Windows / Electron-Smoke (shard 1/3)passed on the healthy path.