Repository navigation
Stage Helix dependencies serially before parallel scenario sends - #136764
Merged
Merged
Conversation
Browser/WASI scenario projects share artifacts/obj/helix-staging. When sendtohelix.proj fans out with BuildInParallel, they copy the same tool directories (e.g. chrome) concurrently, and one project's Helix upload can zip chrome.dll while another is still writing it, failing on Windows with a sharing violation. Fixes #136747 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
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. |
Contributor
|
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries |
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Mock-based validation does not exercise the Windows file-sharing failure, leaving the MSBuild serial-staging/parallel-upload handoff unconfirmed in real Windows browser/WASI CI.
No open issues 🎉
What changed in this PR
This PR addresses the shared-tool staging race behind #136747 by staging browser and WASI Helix dependencies serially before parallel scenario submissions.
Changes:
- Adds a serial dependency-staging pass when multiple browser or WASI scenario projects will run in parallel.
- Skips work-item creation and informational initial targets during staging-only runs, preserving normal submission behavior.
| File | Description |
|---|---|
src/libraries/sendtohelixhelp.proj |
Guards work-item creation and logging targets with the staging-only property. |
src/libraries/sendtohelix.proj |
Stages dependencies serially before the parallel Test fan-out. |
Review effort: Balanced
pavelsavara
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Browser and WASI scenario projects stage shared tools (chrome, chromedriver, v8, wasmtime, ...) into the same
artifacts/obj/helix-stagingdirectory.sendtohelix.projfans the scenario projects out withBuildInParallel=true(e.g. 4 BuildWasmApps variants), and each runsStageDependenciesForHelixfrom itsInitialTargets. The!Exists(...)guard passes for all of them before any creates the directory, so they copy the same files concurrently. One project's Helix upload then zipschrome.dllwhile another is still writing it, which fails on Windows with a sharing violation ("locked by: MSBuild.dll").Changes
sendtohelix.proj: for browser/WASI when projects run in parallel, invokeStageDependenciesForHelixon each scenario project serially (with_StageHelixDependenciesOnly=true) before the parallelTestfan-out. The staging paths are version-keyed and identical across scenarios, so later projects see the completed directories and skip staging.sendtohelixhelp.proj: skipPrintHelixQueues,PrintBuildTargetFramework, andBuildHelixWorkItems(theInitialTargets) when_StageHelixDependenciesOnly=true, so the staging pass only copies files and doesn't build work items or print duplicate log lines.Validation
./dotnet.sh msbuild src/libraries/sendtohelixhelp.proj -t:StageDependenciesForHelix -p:TargetOS=browser -p:Scenario=BuildWasmApps -p:_StageHelixDependenciesOnly=true ...against fake tool directories: staging completed and the initial targets did not run. The same command without the property ran the initial targets as before.sendtohelix.projpreprocesses cleanly.Fixes #136747
Note
This PR was generated with the assistance of GitHub Copilot.