Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webserver): do not spawn webserver as a new process group #18564

Merged

Conversation

aslushnikov
Copy link
Collaborator

@aslushnikov aslushnikov commented Nov 4, 2022

This patch stops using processLauncher to launch web servers. Process Launcher
will spawn a new process group which is separate from test runner.

This might result in unexpected behavior, e.g. kill -sigkill -<testrunnerpid> will orphan web server process.

Instead, this patch simply spawns web server and sends SIGTERM to it
when ready.

@mxschmitt mxschmitt requested a review from dgozman November 4, 2022 15:54
@pavelfeldman
Copy link
Member

Let's revert separately and then carefully look at the actual bug and the right fix.

packages/playwright-test/src/plugins/webServerPlugin.ts Outdated Show resolved Hide resolved
packages/playwright-test/src/plugins/webServerPlugin.ts Outdated Show resolved Hide resolved
tests/playwright-test/web-server.spec.ts Outdated Show resolved Hide resolved
This patch:
- reverts c63a0b5.
- stops using `processLauncher` to launch web servers. Process Launcher
  will spawn a new process group which is separate from test runner.
  This might result in unexpected behavior, e.g. `kill -sigkill
  -<testrunnerpid>` will orphane web server process.

  Instead, this patch simply spawns web server and sends `SIGTERM` to it
  when ready.
@aslushnikov aslushnikov force-pushed the properly-spawn-web-server-process branch from 455d4dc to 9fd07d8 Compare November 11, 2022 00:21
@aslushnikov aslushnikov merged commit 26044c1 into microsoft:main Nov 11, 2022
@aslushnikov aslushnikov deleted the properly-spawn-web-server-process branch November 11, 2022 06:30
aslushnikov added a commit to aslushnikov/playwright that referenced this pull request Nov 21, 2022
aslushnikov added a commit that referenced this pull request Nov 21, 2022
aslushnikov added a commit to aslushnikov/playwright that referenced this pull request Nov 21, 2022
aslushnikov added a commit to aslushnikov/playwright that referenced this pull request Nov 21, 2022
aslushnikov added a commit that referenced this pull request Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants