- Issue created by @shagel
- πΊπΈUnited States benjifisher Boston area
I get a similar message whenever I run a PHPUnit (functional) test locally:
% ddev ssh $ vendor/bin/phpunit -c /var/www/html/docroot/core .../mymodule/tests/src/Functional/myTest.php PHPUnit 9.6.17 by Sebastian Bergmann and contributors. Testing Drupal\Tests\mymodule\Functional\myTest E 1 / 1 (100%) Time: 00:45.250, Memory: 6.00 MB There was 1 error: 1) Drupal\Tests\mymodule\Functional\myTest::testSomething rmdir(sites/simpletest/66945416/files/php/twig): Directory not empty /var/www/html/docroot/core/lib/Drupal/Core/File/FileSystem.php:267 /var/www/html/docroot/core/lib/Drupal/Core/File/FileSystem.php:372 /var/www/html/docroot/core/lib/Drupal/Core/File/FileSystem.php:368 /var/www/html/docroot/core/lib/Drupal/Core/File/FileSystem.php:368 /var/www/html/docroot/core/lib/Drupal/Core/File/FileSystem.php:368 /var/www/html/docroot/core/tests/Drupal/Tests/BrowserTestBase.php:440 /var/www/html/docroot/core/tests/Drupal/Tests/BrowserTestBase.php:451 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
I think the problem is that the directories have some read-only files:
$ ls -la docroot/sites/simpletest/66945416/files/php/twig/6600805a5f742_form.html.twig__H1nbTzrPjfuHbUA8mlc314Nq/ total 8 drwxrwxrwx 4 benji dialout 128 Mar 24 19:34 . drwx------ 19 benji dialout 608 Mar 24 19:34 .. -r--r--r-- 1 benji dialout 685 Mar 24 19:34 .htaccess -r--r--r-- 1 benji dialout 3216 Mar 24 19:34 S0AF3M2xqzavbsX8kSimZT3HqUxKvNg8rT1PXMN6340.php
I can remove the file, but only with a confirmation:
$ rm docroot/sites/simpletest/66945416/files/php/twig/6600805a5f742_form.html.twig__H1nbTzrPjfuHbUA8mlc314Nq/.htaccess rm: remove write-protected regular file 'docroot/sites/simpletest/66945416/files/php/twig/6600805a5f742_form.html.twig__H1nbTzrPjfuHbUA8mlc314Nq/.htaccess'? y $ ls -la docroot/sites/simpletest/66945416/files/php/twig/6600805a5f742_form.html.twig__H1nbTzrPjfuHbUA8mlc314Nq/ total 4 drwxrwxrwx 3 benji dialout 96 Mar 24 19:39 . drwx------ 19 benji dialout 608 Mar 24 19:34 .. -r--r--r-- 1 benji dialout 3216 Mar 24 19:34 S0AF3M2xqzavbsX8kSimZT3HqUxKvNg8rT1PXMN6340.php
- πΊπΈUnited States benjifisher Boston area
I do not know whether my problem is the same as what @shagel sees, but I realize now that
- I should have mentioned that I see the same thing when running a core test, like
core/modules/node/tests/src/Functional/NodeTitleTest.php
. - The test fails with the message in #6 when I use a new Mac.
- The test passes when I use an older Linux computer.
My work computer is a shiny, new Mac with an M3 ARM processor. I use DDEV and Colima to run Drupal, including the PHPUnit tests. There must be some problem with how the Docker container works with the underlying filesystem.
My personal computer is Ubuntu with an AMD chip.
- I should have mentioned that I see the same thing when running a core test, like
- πΊπΈUnited States mark_fullmer Tucson
I can corroborate that our team has experienced this specifically on MacOS using Docker Desktop > v4.20. We were able to reliably confirm that previous versions of Docker Desktop did not result in this same problem.
- π«π·France nod_ Lille
So something like having a lock set on cache clear, and only serving the assets without writing to the folder when the lock is present?
- π§πͺBelgium stefvanlooveren
We also experencied some deployments where not all aggregated files were deleted. I figure a lot of devOps systems might be having problems regarding this issue.