test(web): upgrade msw to v2 and delete suite sharding - #3835
Closed
tyler-dane wants to merge 3 commits into
Closed
tyler-dane wants to merge 3 commits into
tyler-dane wants to merge 3 commits into
Conversation
msw@2 survives bun --isolate, so bun test:web can use --parallel like the other packages. Drop WEB_TEST_SHARDS, the RSS watchdog, and the split unit-leg (web, 1|2) matrix. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
--parallel implies --isolate, which clears globalThis between files while the preload stays loaded. Re-apply jsdom onto the globals and re-listen the MSW server in beforeAll so the suite can run in one parallel process without the old shard split. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Default --parallel uses CPU count, and that many jsdom isolate workers OOM GitHub runners. Two workers keep --parallel without restoring shards. Also remirror timers, fake-indexeddb, and window.fetch after isolate. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Contributor
|
Closing: MSW v2 plus deleting web suite sharding did not meet its CI budget on current main. Evidence:
Do not reopen #3787/#3792; this is the same class of missed budget, not a product decision. |
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.
Fixes #3334
What and why
Upgrade
packages/webfrom EOLmsw@1tomsw@2and convert handlers fromrest/ctxtohttp/HttpResponse. MSW v2 survives Bun--isolate, sobun test:webcan use--parallellike the other packages.That lets us delete the web-only sharding machinery:
DEFAULT_WEB_SHARDS,shardTargets,guardRss,readRssMb, the web-onlyparallelArgsForbranch,WEB_TEST_SHARDS/WEB_TEST_SHARD_INDEX, and the splitunit-leg (web, 1|2)matrix. The required check stays theunitrollup, so the ruleset does not need to change.No production code and no tests weakened.
Verify
In progress:
bun run verify --strictafter this draft. Will update with theVERDICT:line.