Repository navigation
build: balance CI test shards by measured spec duration - #53441
Merged
Merged
Conversation
MarshallOfSound
marked this pull request as ready for review
September 3, 2026 06:15
split-tests.js assigned spec files round-robin by `it(` count, which put api-browser-window-spec.ts and api-autoupdater-darwin-spec.ts on the same macOS x64 shard (29 test-minutes) while its siblings got 13 and 7.5. - split-tests.js packs files largest-first into the lightest shard using per-platform seconds from script/spec-weights.json; files without a weight get the median, and with no weights it falls back to `it(` count. - The spec runner writes per-file wall time to spec/artifacts/ spec-timings.json on CI (already uploaded with the test artifacts), and script/gen-spec-weights.js folds a downloaded set of those into spec-weights.json. - Seed weights are derived from the test logs of build run 33716702873.
The setWindowOpenHandler zoomFactor test opens http://localhost at zoomFactor 2.0 in the default session, which records a persisted per-host zoom level for localhost. With the weighted shard split this spec now shares a shard with api-web-contents-spec, whose 'cannot persist zoom level after navigation with webFrame' test loads localhost in the default session and expects a zoom level of 0.
MarshallOfSound
force-pushed
the
build/weighted-spec-shards
branch
from
September 3, 2026 07:17
0422050 to
dcd55ce
Compare
jkleinsc
approved these changes
Sep 3, 2026
jkleinsc
left a comment
Member
There was a problem hiding this comment.
LGTM.
It would be nice to have a scheduled job to update spec-weights.json.
Member
Author
Coming soon |
|
No Release Notes |
Contributor
|
@MarshallOfSound has manually backported this PR to "45-x-y", please check out #53561 |
Contributor
|
@MarshallOfSound has manually backported this PR to "44-x-y", please check out #53562 |
Contributor
|
@MarshallOfSound has manually backported this PR to "43-x-y", please check out #53563 |
Contributor
|
@MarshallOfSound has manually backported this PR to "42-x-y", please check out #53564 |
MarshallOfSound
added a commit
that referenced
this pull request
Sep 5, 2026
* build: balance CI test shards by measured spec duration split-tests.js assigned spec files round-robin by `it(` count, which put api-browser-window-spec.ts and api-autoupdater-darwin-spec.ts on the same macOS x64 shard (29 test-minutes) while its siblings got 13 and 7.5. - split-tests.js packs files largest-first into the lightest shard using per-platform seconds from script/spec-weights.json; files without a weight get the median, and with no weights it falls back to `it(` count. - The spec runner writes per-file wall time to spec/artifacts/ spec-timings.json on CI (already uploaded with the test artifacts), and script/gen-spec-weights.js folds a downloaded set of those into spec-weights.json. - Seed weights are derived from the test logs of build run 33716702873. * test: isolate window.open zoomFactor spec in its own partition The setWindowOpenHandler zoomFactor test opens http://localhost at zoomFactor 2.0 in the default session, which records a persisted per-host zoom level for localhost. With the weighted shard split this spec now shares a shard with api-web-contents-spec, whose 'cannot persist zoom level after navigation with webFrame' test loads localhost in the default session and expects a zoom level of 0. (cherry picked from commit 8baab86)
MarshallOfSound
added a commit
that referenced
this pull request
Sep 5, 2026
* build: balance CI test shards by measured spec duration split-tests.js assigned spec files round-robin by `it(` count, which put api-browser-window-spec.ts and api-autoupdater-darwin-spec.ts on the same macOS x64 shard (29 test-minutes) while its siblings got 13 and 7.5. - split-tests.js packs files largest-first into the lightest shard using per-platform seconds from script/spec-weights.json; files without a weight get the median, and with no weights it falls back to `it(` count. - The spec runner writes per-file wall time to spec/artifacts/ spec-timings.json on CI (already uploaded with the test artifacts), and script/gen-spec-weights.js folds a downloaded set of those into spec-weights.json. - Seed weights are derived from the test logs of build run 33716702873. * test: isolate window.open zoomFactor spec in its own partition The setWindowOpenHandler zoomFactor test opens http://localhost at zoomFactor 2.0 in the default session, which records a persisted per-host zoom level for localhost. With the weighted shard split this spec now shares a shard with api-web-contents-spec, whose 'cannot persist zoom level after navigation with webFrame' test loads localhost in the default session and expects a zoom level of 0. (cherry picked from commit 8baab86)
MarshallOfSound
added a commit
that referenced
this pull request
Sep 5, 2026
* build: balance CI test shards by measured spec duration split-tests.js assigned spec files round-robin by `it(` count, which put api-browser-window-spec.ts and api-autoupdater-darwin-spec.ts on the same macOS x64 shard (29 test-minutes) while its siblings got 13 and 7.5. - split-tests.js packs files largest-first into the lightest shard using per-platform seconds from script/spec-weights.json; files without a weight get the median, and with no weights it falls back to `it(` count. - The spec runner writes per-file wall time to spec/artifacts/ spec-timings.json on CI (already uploaded with the test artifacts), and script/gen-spec-weights.js folds a downloaded set of those into spec-weights.json. - Seed weights are derived from the test logs of build run 33716702873. * test: isolate window.open zoomFactor spec in its own partition The setWindowOpenHandler zoomFactor test opens http://localhost at zoomFactor 2.0 in the default session, which records a persisted per-host zoom level for localhost. With the weighted shard split this spec now shares a shard with api-web-contents-spec, whose 'cannot persist zoom level after navigation with webFrame' test loads localhost in the default session and expects a zoom level of 0. (cherry picked from commit 8baab86)
MarshallOfSound
added a commit
that referenced
this pull request
Sep 5, 2026
* build: balance CI test shards by measured spec duration split-tests.js assigned spec files round-robin by `it(` count, which put api-browser-window-spec.ts and api-autoupdater-darwin-spec.ts on the same macOS x64 shard (29 test-minutes) while its siblings got 13 and 7.5. - split-tests.js packs files largest-first into the lightest shard using per-platform seconds from script/spec-weights.json; files without a weight get the median, and with no weights it falls back to `it(` count. - The spec runner writes per-file wall time to spec/artifacts/ spec-timings.json on CI (already uploaded with the test artifacts), and script/gen-spec-weights.js folds a downloaded set of those into spec-weights.json. - Seed weights are derived from the test logs of build run 33716702873. * test: isolate window.open zoomFactor spec in its own partition The setWindowOpenHandler zoomFactor test opens http://localhost at zoomFactor 2.0 in the default session, which records a persisted per-host zoom level for localhost. With the weighted shard split this spec now shares a shard with api-web-contents-spec, whose 'cannot persist zoom level after navigation with webFrame' test loads localhost in the default session and expects a zoom level of 0. (cherry picked from commit 8baab86)
codebytere
pushed a commit
that referenced
this pull request
Sep 5, 2026
build: balance CI test shards by measured spec duration (#53441) * build: balance CI test shards by measured spec duration split-tests.js assigned spec files round-robin by `it(` count, which put api-browser-window-spec.ts and api-autoupdater-darwin-spec.ts on the same macOS x64 shard (29 test-minutes) while its siblings got 13 and 7.5. - split-tests.js packs files largest-first into the lightest shard using per-platform seconds from script/spec-weights.json; files without a weight get the median, and with no weights it falls back to `it(` count. - The spec runner writes per-file wall time to spec/artifacts/ spec-timings.json on CI (already uploaded with the test artifacts), and script/gen-spec-weights.js folds a downloaded set of those into spec-weights.json. - Seed weights are derived from the test logs of build run 33716702873. * test: isolate window.open zoomFactor spec in its own partition The setWindowOpenHandler zoomFactor test opens http://localhost at zoomFactor 2.0 in the default session, which records a persisted per-host zoom level for localhost. With the weighted shard split this spec now shares a shard with api-web-contents-spec, whose 'cannot persist zoom level after navigation with webFrame' test loads localhost in the default session and expects a zoom level of 0. (cherry picked from commit 8baab86)
codebytere
pushed a commit
that referenced
this pull request
Sep 5, 2026
build: balance CI test shards by measured spec duration (#53441) * build: balance CI test shards by measured spec duration split-tests.js assigned spec files round-robin by `it(` count, which put api-browser-window-spec.ts and api-autoupdater-darwin-spec.ts on the same macOS x64 shard (29 test-minutes) while its siblings got 13 and 7.5. - split-tests.js packs files largest-first into the lightest shard using per-platform seconds from script/spec-weights.json; files without a weight get the median, and with no weights it falls back to `it(` count. - The spec runner writes per-file wall time to spec/artifacts/ spec-timings.json on CI (already uploaded with the test artifacts), and script/gen-spec-weights.js folds a downloaded set of those into spec-weights.json. - Seed weights are derived from the test logs of build run 33716702873. * test: isolate window.open zoomFactor spec in its own partition The setWindowOpenHandler zoomFactor test opens http://localhost at zoomFactor 2.0 in the default session, which records a persisted per-host zoom level for localhost. With the weighted shard split this spec now shares a shard with api-web-contents-spec, whose 'cannot persist zoom level after navigation with webFrame' test loads localhost in the default session and expects a zoom level of 0. (cherry picked from commit 8baab86)
codebytere
pushed a commit
that referenced
this pull request
Sep 5, 2026
build: balance CI test shards by measured spec duration (#53441) * build: balance CI test shards by measured spec duration split-tests.js assigned spec files round-robin by `it(` count, which put api-browser-window-spec.ts and api-autoupdater-darwin-spec.ts on the same macOS x64 shard (29 test-minutes) while its siblings got 13 and 7.5. - split-tests.js packs files largest-first into the lightest shard using per-platform seconds from script/spec-weights.json; files without a weight get the median, and with no weights it falls back to `it(` count. - The spec runner writes per-file wall time to spec/artifacts/ spec-timings.json on CI (already uploaded with the test artifacts), and script/gen-spec-weights.js folds a downloaded set of those into spec-weights.json. - Seed weights are derived from the test logs of build run 33716702873. * test: isolate window.open zoomFactor spec in its own partition The setWindowOpenHandler zoomFactor test opens http://localhost at zoomFactor 2.0 in the default session, which records a persisted per-host zoom level for localhost. With the weighted shard split this spec now shares a shard with api-web-contents-spec, whose 'cannot persist zoom level after navigation with webFrame' test loads localhost in the default session and expects a zoom level of 0. (cherry picked from commit 8baab86)
codebytere
pushed a commit
that referenced
this pull request
Sep 5, 2026
build: balance CI test shards by measured spec duration (#53441) * build: balance CI test shards by measured spec duration split-tests.js assigned spec files round-robin by `it(` count, which put api-browser-window-spec.ts and api-autoupdater-darwin-spec.ts on the same macOS x64 shard (29 test-minutes) while its siblings got 13 and 7.5. - split-tests.js packs files largest-first into the lightest shard using per-platform seconds from script/spec-weights.json; files without a weight get the median, and with no weights it falls back to `it(` count. - The spec runner writes per-file wall time to spec/artifacts/ spec-timings.json on CI (already uploaded with the test artifacts), and script/gen-spec-weights.js folds a downloaded set of those into spec-weights.json. - Seed weights are derived from the test logs of build run 33716702873. * test: isolate window.open zoomFactor spec in its own partition The setWindowOpenHandler zoomFactor test opens http://localhost at zoomFactor 2.0 in the default session, which records a persisted per-host zoom level for localhost. With the weighted shard split this spec now shares a shard with api-web-contents-spec, whose 'cannot persist zoom level after navigation with webFrame' test loads localhost in the default session and expects a zoom level of 0. (cherry picked from commit 8baab86)
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.
Description of Change
script/split-tests.jsassigned spec files to shards round-robin byit(count, so heavy files with few tests landed together: on macOS x64 the three darwin shards carried 29 / 13 / 7.5 test-minutes, and the 29-minute one is the last job to finish in mostbuild.ymlruns.split-tests.jsnow packs files largest-first into the lightest shard using per-platform seconds fromscript/spec-weights.json. Unweighted files get the median; with no weights file it falls back toit(count.spec/artifacts/spec-timings.jsonon CI (already uploaded with the test artifacts);script/gen-spec-weights.js <downloaded-artifacts-dir>regenerates the weights from a run.Expected x64 darwin shards with the seed weights: ~18 / 18 / 18 test-minutes instead of 29 / 13 / 7.5 (slowest shard ~23 min instead of 34 including setup). Windows and Linux shards even out too but weren't on the critical path.
Checklist
Release Notes
Notes: none