- Issue created by @wim leers
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
This clearly should fail tests, but it passesโฆ ๐ฑ
- Assigned to kunal.sachdev
- Status changed to Needs work
over 1 year ago 8:07am 9 March 2023 - @kunalsachdev opened merge request.
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 8:50am 10 March 2023 - Assigned to kunal.sachdev
- Status changed to Needs work
over 1 year ago 10:48am 10 March 2023 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
The test coverage proves the problem in HEAD โฆ
โฆ but in reviewing this I realized that the root cause is probably simply a regression caused by ๐ Update FixtureManipulator to work with InstalledPackagesList, real composer show command Fixed ๐
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 1:27pm 10 March 2023 - Assigned to kunal.sachdev
- Status changed to Needs work
over 1 year ago 9:01am 13 March 2023 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
The fix in
GitExcluder
has proper test coverage, because uncommenting it causes the tests to fail:Testing /Users/wim.leers/core/modules/contrib/automatic_updates/package_manager/tests/src/Kernel/PathExcluder F. 2 / 2 (100%) Time: 00:11.157, Memory: 10.00 MB There was 1 failure: 1) Drupal\Tests\package_manager\Kernel\PathExcluder\GitExcluderTest::testGitDirectoriesExcludedActive Failed asserting that an array does not contain 'modules/package_known_to_composer_removed_later/.git'. /Users/wim.leers/core/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122 /Users/wim.leers/core/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:55 /Users/wim.leers/core/modules/contrib/automatic_updates/package_manager/tests/src/Kernel/PathExcluder/GitExcluderTest.php:67 /Users/wim.leers/core/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 FAILURES! Tests: 2, Assertions: 14, Failures: 1. Process finished with exit code 1
๐
That leaves only one question on the MR to be addressed!
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 1:29pm 13 March 2023 - Assigned to kunal.sachdev
- Status changed to Needs work
over 1 year ago 1:56pm 13 March 2023 - Issue was unassigned.
- Status changed to Needs review
over 1 year ago 8:51am 14 March 2023 - Assigned to kunal.sachdev
- Status changed to Needs work
over 1 year ago 11:24am 14 March 2023 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
This now just needs
$allow_plugins=TRUE
for the final bit of clean-up ๐๐ - Assigned to wim leers
- Status changed to Needs review
over 1 year ago 11:51am 14 March 2023 - Assigned to kunal.sachdev
- Status changed to Needs work
over 1 year ago 9:45am 15 March 2023 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
I found the problem. Or actually, two.
Pre-existing
ComposerInstallersTrait
bugIn the test, we only had this:
"installer-paths": { "different_installer_path/package_known_to_composer": ["foo/package_with_different_installer_path_known_to_composer"] }
i.e.
"core": ["type:drupal-core"], "libraries/{$name}": ["type:drupal-library"], "modules/contrib/{$name}": ["type:drupal-module"], "profiles/contrib/{$name}": ["type:drupal-profile"], "themes/contrib/{$name}": ["type:drupal-theme"], "drush/Commands/contrib/{$name}": ["type:drupal-drush"], "modules/custom/{$name}": ["type:drupal-custom-module"], "themes/custom/{$name}": ["type:drupal-custom-theme"]
was missing! ๐ฑ
Fixed in 10ee1d560d8c7eaa37b656dbad5203ae0004dadd.
Pre-existing
\Drupal\fixture_manipulator\FixtureManipulator::addDotGitFolder()
bugThe above also means that
->addDotGitFolder($project_root . "/modules/custom/custom_package_known_to_composer")
and
$not_excluded_paths = [ โฆ 'modules/custom/custom_package_known_to_composer/.git', โฆ ];
in the MR are only passing tests because
addDotGitFolder()
is blindly creating a.git
folder in a directory that doesn't even exist nor contains acomposer.json
โ we need to add basic validation toaddDotGitFolder()
. Otherwise, @kunal.sachdev would have been alerted about this! ๐ขFixed in 0688af9937653905da1c19aaeea356bb9952fccb.
Next
Now that the test infrastructure makes sense again, I'm certain @kunal.sachdev can finish this one! ๐
- Assigned to wim leers
- Status changed to Needs review
over 1 year ago 11:52am 15 March 2023 - Issue was unassigned.
- Status changed to RTBC
over 1 year ago 11:59am 15 March 2023 - Assigned to phenaproxima
- ๐บ๐ธUnited States phenaproxima Massachusetts
Reviewing with an eye to commit.
-
phenaproxima โ
committed fc597cae on 3.0.x authored by
kunal.sachdev โ
Issue #3346717 by kunal.sachdev, Wim Leers, phenaproxima: Regression in...
-
phenaproxima โ
committed fc597cae on 3.0.x authored by
kunal.sachdev โ
- Status changed to Fixed
over 1 year ago 7:31pm 15 March 2023 - Issue was unassigned.
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Thanks for that very nice simplification right at the end! ๐๐
Automatically closed - issue fixed for 2 weeks with no activity.