Problem/Motivation

https://git.drupalcode.org/project/drupal/-/jobs/162191

Drupal\Tests\Core\Command\GenerateThemeTest::testGeneratingFromAnotherTheme
Symfony\Component\Finder\Exception\AccessDeniedException: RecursiveDirectoryIterator::__construct(/builds/project/drupal/sites/simpletest/21880381/files/php/twig/6526592c2580b_node.editing.html.twig__RaNgLtlrqSCHFKI6weeKQxEy): Failed to open directory: No such file or directory

/builds/project/drupal/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php:111
/builds/project/drupal/vendor/symfony/filesystem/Filesystem.php:569
/builds/project/drupal/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php:559
/builds/project/drupal/core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php:38
/builds/project/drupal/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
/builds/project/drupal/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
/builds/project/drupal/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651
/builds/project/drupal/vendor/phpunit/phpunit/src/TextUI/Command.php:144
/builds/project/drupal/vendor/phpunit/phpunit/src/TextUI/Command.php:97

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

catch created an issue. See original summary.

catch’s picture

StatusFileSize
new1.96 KB
catch’s picture

StatusFileSize
new1.93 KB
catch’s picture

StatusFileSize
new1.93 KB
catch’s picture

Title: Random test failure in GenerateThemeTest::testGeneratingFromAnotherThem » [random test failure] in GenerateThemeTest::testGeneratingFromAnotherThem
spokje’s picture

StatusFileSize
new3.16 KB

Interesting stuff going on in the multiple-time patches.

For one: Concurrency kills the cat, or at least the available disk-space, it can't handle 36 concurrent instances (the default Drupal CI-setting) copying the code-base for each single test in this test class, and runs out of it.

Secondly,

Failed to copy "/var/www/html/core/node_modules/debug/README.md"

looks like we're copying the core/node_modules, which isn't needed nor helpful IMHO. Opened #3396574: Exclude copying 'core/node_modules' in getCodebaseFinder

Thirdly: Looking at the trace from the IS:

RecursiveDirectoryIterator::__construct(/builds/project/drupal/sites/simpletest/21880381/files/php/twig/6526592c2580b_node.editing.html.twig__RaNgLtlrqSCHFKI6weeKQxEy): Failed to open directory: No such file or directory

Why is the test trying to copy something from a directory that we explicitly (tried to?) excluded in the Iterator: ->notPath('#^sites/simpletest#')?

With #3396574: Exclude copying 'core/node_modules' in getCodebaseFinder and a concurrency of 10 we can just about squeeze a 200x run out of this test.

spokje’s picture

Well, besides 200x being just around the limit (hence the massive amount of reruns due to DrupalCI timing out), there's just one failure in a teardown, which seems like a fluke.

Which is also what I'm going to label the original failure. Either or fluke or the FileIterator works differently on GitLab, which seems very unlikely.

With #3396574: Exclude copying 'core/node_modules' in getCodebaseFinder, I've squeezed all out of this one that I can think off.

catch’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

I've committed #3396574: Exclude copying 'core/node_modules' in getCodebaseFinder. Moving this down to normal and needs more info until or if it shows up again.

spokje’s picture

Thanks @catch, let's see if this one shows up ever again.

quietone’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
Issue tags: +Bug Smash Initiative

There hasn't been any reports of this test failing here or in the parent issue in the last 1 yr 7 months. I think this can be closed.

Closing as a duplicate of #3396574: Exclude copying 'core/node_modules' in getCodebaseFinder.