[wasm][coreclr] Batch CoreCLR library test suites on Helix#126157
[wasm][coreclr] Batch CoreCLR library test suites on Helix#126157radekdoulik merged 13 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce Helix queue pressure for WASM CoreCLR library testing by batching many individual test-suite work items into a smaller number of larger work items, using a batch runner to execute multiple suites sequentially with isolated result uploads.
Changes:
- Add a WASM batch runner script to unzip and run multiple test suites sequentially inside one Helix work item.
- Extend
sendtohelix-browser.targetsto optionally generate batched Helix work items via an MSBuild bin-packing step and per-batch timeout computation. - Adjust browser/CoreCLR Helix and xharness timeouts, and update the browser/CoreCLR test exclusion list.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/libraries/tests.proj |
Updates the browser/CoreCLR disabled-test list (significant exclusion removals). |
src/libraries/sendtohelixhelp.proj |
Increases default Helix work item timeout for browser/CoreCLR. |
src/libraries/sendtohelix-browser.targets |
Adds batching mode, grouping/timeout tasks, and a new target to emit batched Helix work items. |
eng/testing/tests.wasm.targets |
Increases xharness timeout default for CoreCLR WASM test runs. |
eng/testing/WasmBatchRunner.sh |
New script to run multiple suite zips in one work item with per-suite upload directories. |
Reduce Helix queue pressure by grouping ~172 individual WASM CoreCLR library test work items into ~23 batched work items (87% reduction). Changes: - Add eng/testing/WasmBatchRunner.sh: batch runner that extracts and runs multiple test suites sequentially within a single work item, with per-suite result isolation - Add greedy bin-packing inline MSBuild task (_GroupWorkItems) that distributes test archives into balanced batches by file size - Add _AddBatchedWorkItemsForLibraryTests target gated on WasmBatchLibraryTests property (defaults true for CoreCLR+Chrome) - Sample apps excluded from batching, kept as individual work items - Can be disabled with /p:WasmBatchLibraryTests=false Expected impact: - 172 → ~23 Helix work items (87% queue pressure reduction) - ~6% machine time savings (~26 minutes) - Longest batch ~18 minutes (well-balanced bin-packing) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove unused EXECUTION_DIR variable from WasmBatchRunner.sh - Use PayloadArchive (ZIP) instead of PayloadDirectory to pass sendtohelixhelp.proj validation - Use HelixCommand with RunTests.sh→WasmBatchRunner.sh substitution to preserve env var setup and pre-commands Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cf67805 to
a751466
Compare
This comment has been minimized.
This comment has been minimized.
Batch--1 (1 item) and Batch-5 (8 items) timed out in CI because the 2min/suite formula was too aggressive. System.IO.Compression alone takes 11m, System.Security.Cryptography takes 17m, and Microsoft.Bcl.Memory takes 6m. With 19/21 batches passing and the longest at 17m24s, a 30m minimum provides adequate headroom. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
|
/azp run runtime |
|
Azure Pipelines successfully started running 1 pipeline(s). |
- Restore HELIX_WORKITEM_UPLOAD_ROOT after batch loop for post-commands - Clean up extracted suite directories to free disk between suites - Remove stale batch staging directory before creating new batches - Fix stale timeout comment to match actual values (20m/suite, 30m min) - Remove dead V8/Firefox conditions (batching only runs for Chrome) - Remove unused System.Linq import Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
|
copilot's analysis: |
|
The tests counts look good too: |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Note This review was generated by Copilot (Claude Opus 4.6 + Claude Sonnet 4.6 multi-model review). 🤖 Copilot Code Review — PR #126157Holistic AssessmentMotivation: Reducing Helix queue pressure from ~172 to ~21 work items (88% reduction) is a well-justified infrastructure improvement. Helix per-work-item overhead (scheduling, payload download, artifact upload, queue slot acquisition) is real and documented. The claimed 56% total machine time savings (~245 minutes) is plausible and supported by the per-batch breakdown in the PR description. Approach: Greedy bin-packing (Longest Processing Time) by file size is a well-known heuristic for makespan minimization and is appropriate here. The Summary: Detailed Findings
|
|
Lets get this in to relieve CI. I will do another batch of improvements in followup PR, where I would like to enable it on mono legs too. |
Note
This PR description was AI/Copilot-generated.
Summary
Reduce Helix queue pressure by grouping ~172 individual WASM CoreCLR library test work items into ~21 batched work items (88% reduction), saving 56% of total machine time.
Verified CI Results
All numbers from the latest CI run (build 1361877), compared against an unbatched baseline from the same queue:
Per-Batch Breakdown (latest run)
Where the Savings Come From
The 56% machine time reduction (~245 minutes saved) comes from eliminating Helix per-work-item overhead:
Chrome and xharness are not re-downloaded per they are in the Helix correlation payload (shared per machine). Chrome restarts per suite within batches (~1s each), so reusing Chrome would only save ~3 minutes total (not worth xharness changes).item
Changes
eng/testing/WasmBatchRunner.sh(new): Batch runner script that extracts and runs multiple test suites sequentially within a single Helix work item, with per-suite result isolation via separateHELIX_WORKITEM_UPLOAD_ROOTdirectories. Includes error handling for failed extractions (preserving actual unzip exit code) and restoresHELIX_WORKITEM_UPLOAD_ROOTafter the batch loop for Helix post-commands.src/libraries/sendtohelix-browser.targets(modified):WasmBatchLibraryTestsproperty (defaultstruefor CoreCLR+Chrome,falseotherwise)_AddBatchedWorkItemsForLibraryTeststarget: stages batch directories, zips them (PayloadArchive), and constructs HelixCommand viaReplacewith a build-time validation guardWasmBatchLibraryTests != truesrc/tasks/HelixTestTasks/(new project):GroupWorkItemscompiled MSBuild task: greedy bin-packing by file size, large suites (>50MB) stay soloComputeBatchTimeoutcompiled MSBuild task: 20 min/suite, 30 min minimum (accounts for WASM startup overhead + heaviest suites like Cryptography at ~17m)UsingTaskfromsendtohelix-browser.targetsDesign
The batch runner is a thin loop wrapper around each suite's existing
RunTests.sh. It does not duplicate any test setup all xharness/Chrome/WASM configuration stays inside each suite's generated runner script. The coupling surface is minimal:logicHelixCommandprefix (env vars, dev-certs) is preserved via.Replace()on the./RunTests.shsuffix<Error>guard validates the replacement succeededHELIX_WORKITEM_UPLOAD_ROOTis isolated to a per-suite subdirectory<RemoveDir>before each buildOpt-out
Disable with
/p:WasmBatchLibraryTests=falseto fall back to individual work items.