Problem/Motivation

In a simple functional test run there are 11 container rebuilds. Let's try to reduce that number.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3571994

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

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review

This change reduces the number of container builds from 11 to 9.

longwave’s picture

Not very scientific yet, but looks promising:

Functional tests on main:
https://git.drupalcode.org/project/drupal/-/pipelines/734148/builds

Minimum 5:20
Maximum 6:17

Functional tests on this MR:
https://git.drupalcode.org/issue/drupal-3571994/-/pipelines/735093/builds

Minimum 3:11
Maximum 4:48

longwave’s picture

Tried some further combining of container rebuilds, but in more complicated test setups this isn't going to work. Just avoiding rebuilding the InstallerKernel twice is good enough for now.

longwave’s picture

The latest changes get it down from 11 to 8 builds in a trivial test.

Measuring the job runtime isn't very useful because of variance in container startup time. If instead we look at the actual runtimes reported in the logs:

Functional tests on main:
https://git.drupalcode.org/project/drupal/-/pipelines/734148/builds
BrowserTestBase: 3:34 to 4:31
WebDriverTestBase: 3:37 to 4:15

Functional tests on this branch:
https://git.drupalcode.org/issue/drupal-3571994/-/pipelines/735196/builds
BrowserTestBase: 1:47 (!) to 4:47
WebDriverTestBase: 3:25 to 4:42

Unfortunately it appears to depend more on hardware availability and time of day than anything else, maybe this is still worth it though?

catch’s picture

Status: Needs review » Reviewed & tested by the community

Yeah there seem to be huge differences depending on time of day and hardware, but if the floor goes down, that is a good sign it's doing what it's supposed to.

Can't see anything to complain about, so moving to RTBC.

We have a noticeable regression in functional test times between main and 11.x (unless that is also unlucky hardware variation, could not detect anything locally), but looks like this is equally applicable to main and 11.x so it'll just mean a different baseline for both branches.

alexpott’s picture

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

Committed and pushed c84deaef44f to main and 70b8759d613 to 11.x. Thanks!

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.

  • alexpott committed 70b8759d on 11.x
    perf: #3571994 Reduce container rebuilds in functional tests
    
    By:...

  • alexpott committed c84deaef on main
    perf: #3571994 Reduce container rebuilds in functional tests
    
    By:...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.