Skip the Docker containers for suites too small to gain from them
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 22/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- docker, mysql, php
- Bereich
- testing-qa
Rechercherichtung
The decision lives in utils/behat-parallel.php, which already computes the per-scenario cost used to balance workers; start there and check how the Docker fallback is chosen when WP_CLI_TEST_DOCKER=auto. The Docker image is built from utils/docker/Dockerfile, which #425 covers. Done means a threshold that skips containers for the small packages listed in the issue, a fallback message like the existing ones, and matching timings on the full matrix.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Part of #394.
Since wp-cli/.github#313, every Linux Behat job runs its scenarios in 4 parallel workers in Docker containers. Large suites gain a lot from it. Small suites pay more than they get back, because every job has a fixed setup cost of about 70 to 80 seconds, whatever its size:
- 40 to 63 seconds before the first worker starts. Most of this is building the worker image from
utils/docker/Dockerfile(see #425 for that part). - Another 20 to 30 seconds for starting the containers and database servers, and for removing them again.
In the full-matrix runs of all 29 packages on 2026-11-02, compared with the median of their October runs on main, runner time per Testing run changed as follows:
| Packages | Before (min) | After (min) | Change | |
|---|---|---|---|---|
| Large suites | 9 | 3,762 | 1,893 | −50% |
| Small suites | 20 | 1,734 | 2,214 | +28% |
In the job for PHP 8.4, WP latest and MySQL 8.0:
| Package | Scenarios | Behat step | Longest worker |
|---|---|---|---|
maintenance-mode-command |
3 | 71 s | 10 s |
role-command |
5 | 84 s | 14 s |
site-health-command |
5 | 87 s | 16 s |
super-admin-command |
5 | 91 s | 20 s |
eval-command |
21 | 91 s | 13 s |
entity-command, for comparison |
511 | 457 s | 372 s |
Before the change, maintenance-mode-command used 49 runner-minutes per Testing run; now it uses 97.
Proposal: with WP_CLI_TEST_DOCKER=auto, run the scenarios without Docker when their expected cost is too low for the containers to pay off, and report it like the other fallbacks ("... Running the scenarios without Docker."). The expected cost per scenario that utils/behat-parallel.php already computes for balancing the workers can decide this, so the threshold does not depend on scenario counts alone. Below the threshold, parallel workers on the runner itself (#405) are still available. These add only a few seconds, as long as the test user can create the worker databases.
WP_CLI_TEST_DOCKER=1 keeps forcing containers, so that a small suite can still be run in them deliberately.
Measuring: pick the threshold from the per-job numbers above. Then run the full matrix of a few small packages (for example maintenance-mode-command, role-command, eval-command, cron-command) and a few packages near the threshold (for example cache-command, export-command) against the change, and compare runner time and Behat time per job with the runs of 2026-11-02. If #425 lands first, measure against it, as a cheaper image moves the break-even point.
- Vorherrschende Sprache
- PHP
- Sterne
- 42
- Forks
- 28
- Ø Merge
- 18 Std. 52 Min.
- Gemergte PRs (30 T.)
- 27
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus wp-cli/wp-cli-tests
-
scope:testing status:unconfirmed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
wp-cli/wp-cli-tests#389 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
scope:testing
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
wp-cli/wp-cli-tests#427 ·
Maintainer antworten meist innerhalb von 1 Tag
-
scope:testing
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
wp-cli/wp-cli-tests#425 ·
Maintainer antworten meist innerhalb von 1 Tag
-
scope:testing
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 20/100
wp-cli/wp-cli-tests#395 ·
Maintainer antworten meist innerhalb von 1 Tag
-
scope:testing
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
wp-cli/wp-cli-tests#394 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in wp-cli/wp-cli-tests
Ähnliche Issues
-
Recognise PHP_CodeSniffer (`phpcs`) as a linterEvtl. vergeben @HarshRajSinghania hat das heute übernommen. Offenenhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
MustacheCase/zanadir#507 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
jwage/phpamqplib-messenger#163 ·
-
Newsletter subscription page logs Undefined array key "nw_error" on every GETEvtl. vergeben @Codencode hat das heute übernommen. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 82/100
PrestaShop/ps_emailsubscription#145 · 1 Kommentar ·
-
PHP 8.5 CURL deprecatedOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100