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

Command icon 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:

Comments

catch created an issue. See original summary.

catch’s picture

Status: Active » Needs review

Yep 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.

plach’s picture

Status: Needs review » Reviewed & tested by the community

Discussed 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.

  • mstrelan committed 49f7b678 on 12.0.x
    task: #3630408 Reduce CPU request for unit tests
    
    By: catch
    By: plach
    (...

  • mstrelan committed 461fc552 on main
    task: #3630408 Reduce CPU request for unit tests
    
    By: catch
    By: plach
    
mstrelan’s picture

Version: main » 12.0.x-dev
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.