Skip to content

[release/8.0-staging] [wasm] Wait for killed processes and retry WBT project cleanup - #137298

Merged
lewing merged 1 commit into
release/8.0-stagingfrom
lewing-port-wbt-cleanup-8.0
Nov 11, 2026
Merged

lewing merged 1 commit into
release/8.0-stagingfrom
lewing-port-wbt-cleanup-8.0

Conversation

@lewing

@lewing lewing commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Fixes Issue #137269

main PR #137297

Description

On Windows, BlazorPublishRunTest intermittently fails in SharedBuildPerTestClassFixture.RemoveDirectory because publish\wwwroot is still in use. The xharness webserver runs with that directory as its working directory, and ToolCommand.Dispose() kills it without waiting for it to exit, so the handle can outlive the kill.

This waits up to 30 s for the killed process to exit in ToolCommand.Dispose(), and retries transient IOException/UnauthorizedAccessException failures (10 attempts, 1 s apart) when deleting build directories. Manual port: the files live under Common/ on this branch, and 8.0 kills via the taskkill-based KillTree.

Customer Impact

None. Test infrastructure only (Wasm.Build.Tests); reduces CI flakiness on Windows.

Regression

No.

Testing

Wasm.Build.Tests compiles locally. The failure is intermittent and Windows-only; CI on this PR exercises the change.

Risk

Very low. Test-only change; no product code is affected.

Package authoring

N/A — test infrastructure only; no package changes.

Note

This PR was generated with the assistance of GitHub Copilot.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

…project cleanup

Port of #137297.

On Windows, BlazorPublishRunTest intermittently fails in
SharedBuildPerTestClassFixture.RemoveDirectory because publish\wwwroot is
still in use. The xharness webserver runs with that directory as its working
directory, and ToolCommand.Dispose() kills it without waiting for exit, so the
handle can outlive the kill.

Wait for the killed process to exit in ToolCommand.Dispose(), and retry
transient IO/access failures when deleting build directories.

Co-authored-by: Copilot App <[email protected]>
@lewing lewing changed the title [release/8.0] [wasm] Wait for killed processes and retry WBT project cleanup [release/8.0-staging] [wasm] Wait for killed processes and retry WBT project cleanup Nov 10, 2026
@lewing
lewing changed the base branch from release/8.0 to release/8.0-staging November 10, 2026 22:38
@lewing
lewing force-pushed the lewing-port-wbt-cleanup-8.0 branch from 1d67cbc to 795b117 Compare November 10, 2026 22:38
@lewing
lewing requested a review from maraf November 11, 2026 15:20
@lewing lewing added the Servicing-approved Approved for servicing release label Nov 11, 2026
@lewing
lewing merged commit 0ea1303 into release/8.0-staging Nov 11, 2026
33 of 34 checks passed
@lewing
lewing deleted the lewing-port-wbt-cleanup-8.0 branch November 11, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Build-mono Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants