test: refactor WPTRunner and enable parallel WPT execution#47635
Merged
nodejs-github-bot merged 5 commits intonodejs:mainfrom Apr 25, 2023
Merged
test: refactor WPTRunner and enable parallel WPT execution#47635nodejs-github-bot merged 5 commits intonodejs:mainfrom
nodejs-github-bot merged 5 commits intonodejs:mainfrom
Conversation
dc0c660 to
514dd0c
Compare
514dd0c to
505b768
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
|
CI: https://ci.nodejs.org/job/node-test-pull-request/51380/ note to look into https://ci.nodejs.org/job/node-test-commit-osx/51831/nodes=osx11-x64/
edit3: I'll move these the few WPTs from wpt/test-timers to test/sequential in a separate PR. #47657 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
anonrig
approved these changes
Apr 22, 2023
This was referenced Apr 24, 2023
aduh95
reviewed
Apr 25, 2023
aduh95
approved these changes
Apr 25, 2023
aduh95
approved these changes
Apr 25, 2023
Collaborator
Collaborator
Collaborator
|
Landed in a5ce18f |
This was referenced Apr 26, 2023
29 tasks
yjl9903
pushed a commit
to yjl9903/node
that referenced
this pull request
Apr 28, 2023
PR-URL: nodejs#47635 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
yjl9903
pushed a commit
to yjl9903/node
that referenced
this pull request
Apr 28, 2023
PR-URL: nodejs#47635 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
32 tasks
yjl9903
pushed a commit
to yjl9903/node
that referenced
this pull request
Apr 29, 2023
PR-URL: nodejs#47635 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This was referenced Apr 30, 2023
targos
pushed a commit
that referenced
this pull request
May 2, 2023
PR-URL: #47635 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Contributor
|
@panva would you be able to backport this to v18.x-staging? |
This comment was marked as outdated.
This comment was marked as outdated.
Member
Author
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.
This PR reintroduces #47283 but with more refactoring done to the runner to get around the issue that caused it to get reverted in #47627.
The issue at hand was that upon test completion the worker gets intentionally terminated, the worker got terminated based on a
Map<string, Worker>where the key is the filename. That was not a problem until concurrency got introduced which meant that the same file but with different query string variants which didn't affect the key were added to the Map. This has lead to some multi variant test workers to get terminated. I've fixed this issue with the refactors explained below and confirmed that it's fixed by comparing the number of individual executed tests to be the same as onmain(and in record time).Screenshot
I've refactored the runner as follows:
WPTRunner.prototype.runJsTests()StatusLoader.prototype.load()and each variant gets it's ownWPTTestSpecinstance.WPTTestSpecinstance insteadreferencingWPTTestSpecinstances in maps is no longer done with their filename but instead a unique SymbolSets are used instead.With this in place then
a unique Symbol pertheWPTTestSpecis now usedWPTTestSpecis now used instead of string/symbol references.WPTTestSpec's filename continues to be usedWPTTestSpec's filename + variant continues to be usedAdditionally:
ResourceLoader.prototype.readgot split intoreadandreadAsFetch, the former is used within the WPTRunner, the latter only from the spawned workersI will applyPRs that should not land on the v20.x-staging branch and should not be released in v20.x.
dont-land-*labels to observe the behaviour for a while before eventually landing this on Current by removing dont-land-on-v20.x