Problem/Motivation
Unit tests run as part of the lint stage, so that they always run even if phpstan/phpcs fail, but they don't block the other tests types, which means they generally finish just about when other jobs are starting or a bit afterwards.
We currently use 4 CPUs and 24 concurrency, but given the job already overlaps with other test jobs, I think we could reduce this, let the jobs run longer, and this would reduce the peak CPU requests for a core pipeline. It may mean we're able to get pods faster and in some cases may prevent spinning up an extra AWS instance to fit everything on.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3630408
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:
- 3630408-reduce-cpu-request
changes, plain diff MR !17420
Comments
Comment #3
catchYep unit test jobs still finish in under 2m30s with 1 CPU each and the theoretical minimum time for a pipeline to finish is just over 4 minutes, fastest ever I've seen was 4m20s. So this finishes with plenty of time and allows us to reduce the peak CPU request for a pipeline by 8, will be more when we add support for more PHP versions.
Comment #4
plachDiscussed this with @catch a bit: realistically we won't be able to go under the 4-5 minutes WT limit without another round of significant changes to the test suite and Drupal CI, so these changes should not be problematic. We may want to revisit these settings, once the situation changes. For instance, when the time to to get a pipeline runner goes down (currently it may take over a minute) or when we are able to lower the time needed to run lint jobs. Both of these are preliminary work that cannot be parallelized with test runs.
This seems a good time to experiment with these new settings without affecting the overall pipeline WT.
Comment #7
mstrelan commentedCommitted and pushed 8cfd6ef6b31 to main and 49f7b678bd3 to 12.0.x. Thanks!
Didn't backport to the 11.x series as neither did any of the following related jobs:
#3624454: Reduce CPU request for linting jobs
#3614817: Reduce functional test job CPU and concurrency
#3613745: Reduce CPU request for build tests and run them last
#3560920: Start unit tests after lint jobs in gitlab CI