Browser plugin: a second Pest process deletes a running parallel run's playwright-server.json
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 66/100
Hướng nghiên cứu
Start with Plugin::terminate(), ServerManager::instance()->playwright()->stop(), PlaywrightNpmServer::stop(), and AlreadyStartedPlaywrightServer::markAsStopped() and fromPersisted(). Trace when the server address is persisted and when another Pest process removes it; reproduce with a parallel browser run and a second Pest process. Done when the second process can exit without removing the running run's server file, and the parallel browser tests continue to pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Pest Version
5.1.1 (pest-plugin-browser 5.0.1)
PHP Version
8.4.23
Operation System
macOS
Description
When a parallel run (--parallel) is using the browser plugin, the parent process starts one Playwright server and writes its address to vendor/pestphp/pest-plugin-browser/.temp/playwright-server.json, which the workers read through AlreadyStartedPlaywrightServer::fromPersisted().
Plugin::terminate() calls ServerManager::instance()->playwright()->stop() in every non-worker process. That ends in PlaywrightNpmServer::stop(), which calls AlreadyStartedPlaywrightServer::markAsStopped() and unlinks the file unconditionally, even when the process never started a server.
So any other Pest process started in the same project while a parallel run is in progress deletes the file when it ends, and every remaining browser test of the parallel run fails with:
file_get_contents(.../vendor/pestphp/pest-plugin-browser/.temp/playwright-server.json): Failed to open stream: No such file or directory
This includes a second process that ends immediately without running any test, for example one that exits from the configured bootstrap file.
Steps to reproduce
- Run a suite with browser tests in parallel:
./vendor/bin/pest --parallel. - While it runs, run any other Pest command in the same project, for example
./vendor/bin/pest tests/Unit/ExampleTest.php. - Every browser test of the first run that starts after step 2 finishes fails with the error above.
Expected
markAsStopped() (or stop()) only removes the persisted file when this process started the server that wrote it, for example by keeping track of whether persist() was called in this process.
- Ngôn ngữ chính
- PHP
- Star
- 11.8k
- Fork
- 559
- Merge trung bình
- 5 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 24
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pestphp/pest
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 5 ngày
-
[Bug]: --mutate hides unreadable files, so mutants behind a failed read can never be killedCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 5 ngày
-
[Bug]: [mutate] Windows: @pest-mutate-ignore comments land on line 1 in files with LF line endingsCó thể đã có người làm @webdevsamran đã nhận 57 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 5 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 5 ngày
-
[pest-plugin-browser] Page::waitForLoadState() never sends its message — waitForEvent() is a silent no-opCó thể đã có người làm @asllanmaciel đã nhận 70 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
pestphp/pest#1892 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
Issue tương tự
-
Group 2 - Data Storage | Tripal DBX | Chado Group 5 - Search | ElasticSearch | Views Priority - Medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
nginx update required due to NGINX2RootCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
mailcow/mailcow-dockerized#7668 · 5 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
lara-zeus/spatie-translatable#80 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
small
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
uiowa/uiowa#10296 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
asyncapi/modelina#2709 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày