Problem/Motivation

Drupal\Tests\config\Functional\ConfigInstallProfileOverrideTest::testInstallProfileConfigOverwrite has been failing quite a bit recently:

Error        27.611s testInstallProfileConfigOverwrite                                               
Failure              *** Process execution output ***                                                
    PHPUnit 11.5.55 by Sebastian Bergmann and contributors.
    
    Runtime:       PHP 8.3.32
    Configuration: /builds/project/drupal/core/phpunit.xml.dist
    
    E                                                                   1 / 1 (100%)
    
    Time: 00:28.351, Memory: 10.00 MB
    
    Config Install Profile Override (Drupal\Tests\config\Functional\ConfigInstallProfileOverride)
     ✘ Install profile config overwrite
       ┐
       ├ Error: Call to a member function label() on null
       │
       │ /builds/project/drupal/core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php:141
       ┴
    
    ERRORS!
    Tests: 1, Assertions: 23, Errors: 1.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3608805

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

godotislate created an issue. See original summary.

nicxvan’s picture

This is cropping up a lot.

godotislate’s picture

Status: Active » Needs review
nicxvan’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense, it's right after a rebuild.

godotislate’s picture

Given the fix here, I was asked in Slack about why the test was failing only intermittently. I have not investigated, but I made this change because the same variable is reset after rebuilding container in every other instance in the same test method.

We could try running a repeat test job with the test class unchanged to confirm that the failures do show when running the test on its own, and also looking at browser output from the job artifacts if necessary.

godotislate’s picture

I ran the 2000x repeat test job on the main commit pipeline: https://git.drupalcode.org/project/drupal/-/jobs/10835212 and it does have intermittent failures.

mstrelan’s picture

This feels like it's failing almost every time for me.

I guess the fix is a similar remedy to the infamous "Assigning entity storage to a property instead of the entity manager" anti-pattern described by @mglaman at https://mglaman.dev/blog/dependency-injection-anti-patterns-drupal

godotislate’s picture

also looking at browser output from the job artifacts if necessary.

So there's no actual browser output because the test doesn't actually do any browser-based actions.

  • catch committed 50978e5d on 10.6.x
    fix: #3608805 [random test failure] Drupal\Tests\config\Functional\...

  • catch committed 2836781e on 11.4.x
    fix: #3608805 [random test failure] Drupal\Tests\config\Functional\...

  • catch committed 6b3c685c on 11.x
    fix: #3608805 [random test failure] Drupal\Tests\config\Functional\...

  • catch committed 33d8350c on main
    fix: #3608805 [random test failure] Drupal\Tests\config\Functional\...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Yeah it's odd that it only randomly fails but very clear that this is the correct fix.

Committed/pushed to main, 11.x, 11.4.x and 10.6.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.

Status: Fixed » Closed (fixed)

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