Problem/Motivation
~
Now that we have 'total time' showing in jobs, it's easy to see when the test distribution is out of balance.
From @catch:
What we have now is:
- run-tests.sh separates out #slow tests, then distributes them between each parallel job ordered by number of test methods descending.
- It then takes all the other jobs, and disributes those between parallel jobs, also ordered by number of methods descending.
- Number of methods includes TestWith etc. because it uses phpunit discovery courtesy of mondrake.
Steps to reproduce
Proposed resolution
Also from @catch:
The main thing this issue does:
- it removes #slow from tests that don't need it - this means the actually slow tests get distributed between runners better, which evens out the total time.
- It adds #slow to a couple of tests that do need it.
If we can find more tests in either bucket, we could even things out more. But it's easier to do this in batches because the variation across pipeline runs is so high. Which is also a potential problem for using phpunit stats to determine this.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3581111-5.test-balance-slack-thread.txt | 5.49 KB | dww |
Issue fork drupal-3581111
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3581111-balance-kernel-tests
changes, plain diff MR !15183
Comments
Comment #3
dwwThanks for working on this!
The changes tab is showing tweaks to Functional, too, expanding the title.
https://git.drupalcode.org/project/drupal/-/pipelines/777661 took 9:52 total, but that doesn't say much.
The 4 Kernel jobs were:
That seems reasonably balanced. Can we move 20 seconds of tests from 3 to 4? 😅
Guess we could compare to other pipelines in other issues, but I don't want to compare apples and oranges. Maybe a recent nightly
mainbuild?The 8 Functional jobs were:
That also seems pretty good. Don't know if we can move 30 seconds of tests from 1, 2 and 5 into 8. That'd be nearly ideal if so. 😅
Comment #4
smustgrave commentedNot sure I can review but wanted to say thanks! This is amazing and I still remember DrupalCI taking almost 2 hours.
Comment #5
dwwHad a nice Slack chat just now with @catch (and @mondrake) about all this. Attaching the transcript (with permission) for posterity.
TL;DR: We don't currently have that much fine-grained control over which tests end up in which buckets, so the stuff I'm requesting/suggesting at #3 isn't really possible.
[edit] I put @catch's excellent summaries into the issue summary.
See transcript for gory details. Adding a bunch of referenced related issues for anyone else who lands here.
Given all that, I'm going to go ahead and RTBC. While this isn't perfect, it's an improvement, so let's move forward without too much more churn in here and focus on the bigger fish that might yield much more significant results.
Thanks!
-Derek
Comment #6
dwwMoving some of that to the summary.
Comment #7
longwaveNeeds rebase:
Comment #8
catchRebased.
Comment #9
longwavePHPStan failure now that Stable9 test has been deleted.
Comment #10
catchShould be happier again.
Comment #11
longwaveCommitted and pushed 284ea826550 to main. Thanks!