Skip to content

test: preserve WSL import failure diagnostics - #337438

Merged
Christof Marti (chrmarti) merged 2 commits into
mainfrom
test-wsl-import-failure-logs
Sep 23, 2026
Merged

Christof Marti (chrmarti) merged 2 commits into
mainfrom
test-wsl-import-failure-logs

Conversation

@chrmarti

@chrmarti Christof Marti (chrmarti) commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Capture the decoded WSL2 import output, exit code, installer result, Windows/WSL versions, partial import files, and bounded WSL/Host Compute/Hyper-V events when the smoke-test distro import fails.
  • Save diagnostics under .build/logs/wsl-dev-container/ before cleanup removes the partial import, so existing CI logs artifacts preserve the evidence.
  • Leave WSL installation, retry, and cleanup behavior unchanged.

Motivated by the Windows Electron setup failure in build 476284, where wsl --import --version 2 returned 0x80041001 without enough evidence to identify the cause.

Validation

  • PowerShell parser reports no errors.
  • Exercised Write-WslDiagnostics locally without importing a distro; verified the persisted log contains the required sections.
  • git diff --check passed.

A Windows CI run is needed to validate the failure path on a hosted agent.

Capture the import error, host and WSL versions, partial distro state, and bounded virtualization events in the CI logs artifact before smoke-test cleanup removes the import directory.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings September 23, 2026 08:52

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.

Copilot review overview

🟡 Changes recommended

The incorrect event-log channel names must be fixed before approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Preserves WSL import failure diagnostics in CI artifacts before cleanup.

Changes:

  • Captures import output, exit codes, versions, partial files, and event logs.
  • Saves diagnostics under .build/logs/wsl-dev-container/.
  • Keeps existing installation, retry, and cleanup behavior.
File Review
test/​smoke/​wslDevContainer.ps1 Adds failure diagnostics. Moderate: Two event-log channel names incorrectly use /Admin, preventing intended Host Compute and VMMS event collection.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/smoke/wslDevContainer.ps1 Resolved
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Base: 0a580c42 Current: 2a8e0eda

No screenshot changes.

Use the hyphenated Host Compute and Hyper-V VMMS Admin channel names so the import failure diagnostics can collect their events.

Co-authored-by: Copilot <[email protected]>
@chrmarti
Christof Marti (chrmarti) merged commit 22647c7 into main Sep 23, 2026
33 of 34 checks passed
@chrmarti
Christof Marti (chrmarti) deleted the test-wsl-import-failure-logs branch September 23, 2026 10:02
@vs-code-engineering vs-code-engineering Bot added this to the 1.140.0 milestone Sep 23, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Nov 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants