Skip to content

[release/10.0] [wasm] Wait for killed processes and retry WBT project cleanup - #137353

Merged
lewing merged 1 commit into
release/10.0from
backport/pr-137297-to-release/10.0
Nov 11, 2026
Merged

lewing merged 1 commit into
release/10.0from
backport/pr-137297-to-release/10.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Backport of #137297 to release/10.0

/cc @lewing

Customer Impact

  • Customer reported
  • Found internally

[Select one or both of the boxes. Describe how this issue impacts customers, citing the expected and actual behaviors and scope of the issue. If customer-reported, provide the issue number.]

Regression

  • Yes
  • No

[If yes, specify when the regression was introduced. Provide the PR or commit if known.]

Testing

[How was the fix verified? How was the issue missed previously? What tests were added?]

Risk

[High/Medium/Low. Justify the indication by mentioning how risks were measured and addressed.]

IMPORTANT: If this backport is for a servicing release, please verify that:

  • For .NET 8 and .NET 9: The PR target branch is release/X.0-staging, not release/X.0.
  • For .NET 10+: The PR target branch is release/X.0 (no -staging suffix).

Package authoring no longer needed in .NET 9

IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.

On Windows, `BlazorPublishRunTest` intermittently fails during
`SharedBuildPerTestClassFixture.RemoveDirectory` because
`publish\wwwroot` is still in use by another process.

The xharness `wasm webserver` runs with `publish\wwwroot` as its working
directory. `ToolCommand.Dispose()` kills it with
`Kill(entireProcessTree: true)` but never waits for it to exit.
Termination is asynchronous, so the process can still hold its
current-directory handle when the fixture deletes the project.

Changes:
- `ToolCommand.Dispose()`: after killing the process, wait up to 30 s
for it to exit (and log if it doesn't).
- `SharedBuildPerTestClassFixture.RemoveDirectory`: retry
`IOException`/`UnauthorizedAccessException` up to 10 times, 1 s apart,
before rethrowing the existing error.

Validation: `Wasm.Build.Tests` compiles locally (macOS). The Windows
Blazor tests weren't run locally; the failure is intermittent and only
shows up on Windows.

The reported failures are on release/8.0 and release/9.0, where these
files live under `Common/` and 8.0 uses a `taskkill`-based `KillTree`.
Manual ports will follow.

Resolves #137269

> [!NOTE]
> This PR was generated with the assistance of GitHub Copilot.

Co-authored-by: Copilot App <[email protected]>
@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.

@lewing lewing added the Servicing-approved Approved for servicing release label Nov 11, 2026
@lewing
lewing enabled auto-merge (squash) November 11, 2026 15:37
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

@lewing
lewing merged commit 56d5bb6 into release/10.0 Nov 11, 2026
43 of 44 checks passed
@lewing
lewing deleted the backport/pr-137297-to-release/10.0 branch November 11, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Infrastructure Servicing-approved Approved for servicing release

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant