Problem/Motivation
Although #3584277: [random test failure] ComposerRequirementTest::testComposerInfoShown fixes a commonly occurring random fail in package_manager tests, grep shows a *lot* of other usage of State to control various stuff about package manager tests. These are are ripe for random failures, too. Let's convert all of them to KeyValue per the parent meta.
Steps to reproduce
git checkout main
cd core/modules/package_manager/tests
egrep -ir state -l | sort
Proposed resolution
Replace State with KeyValue. All of the following files inside core/modules/package_manager/tests match "state". They need investigation to rule out false positives, but it's an initial TODO list of things to check and possibly convert:
- ./modules/fixture_manipulator/src/FixtureManipulator.php
- ./modules/fixture_manipulator/src/StageFixtureManipulator.php
- ./modules/package_manager_bypass/src/ComposerStagerExceptionTrait.php
- ./modules/package_manager_bypass/src/LoggingBeginner.php
- ./modules/package_manager_bypass/src/LoggingCommitter.php
- ./modules/package_manager_bypass/src/LoggingDecoratorTrait.php
- ./modules/package_manager_bypass/src/MockPathLocator.php
- ./modules/package_manager_bypass/src/NoOpStager.php
- ./modules/package_manager_bypass/src/PackageManagerBypassServiceProvider.php
- ./modules/package_manager_test_validation/package_manager_test_validation.services.yml
- ./modules/package_manager_test_validation/src/EventSubscriber/TestSubscriber.php
- ./modules/package_manager_test_validation/src/PackageManagerTestValidationServiceProvider.php
./modules/package_manager_test_validation/src/TestExecutableFinder.phpSee #3584277: [random test failure] ComposerRequirementTest::testComposerInfoShown- ./modules/package_manager_test_validation/src/TestSandboxDatabaseUpdatesValidator.php
- ./src/Kernel/DirectWriteTest.php
- ./src/Kernel/LockFileValidatorTest.php
- ./src/Kernel/PackageManagerKernelTestBase.php
- ./src/Kernel/PhpExtensionsValidatorTest.php
- ./src/Kernel/ProjectInfoTest.php
- ./src/Kernel/SandboxManagerBaseTest.php
- ./src/Kernel/StageCommitExceptionTest.php
- ./src/Traits/ComposerInstallersTrait.php
Remaining tasks
- Review above list.
- Any time "state" means the
Stateservice, convert to usingKeyValueinstead. - Open MR
- Reviews / refinements
- RTBC
Comments
Comment #2
dwwThis might be the solution to a bunch of the problems at #3508109: [random test failure] Package manager random build failures. Not calling this duplicate, but definitely related.