Problem/Motivation
Push pipelines on 8.x-2.x failed on 2026-09-29 while the MR and merge train pipelines of the same commits succeeded, and the failing job changed from run to run.
Steps to reproduce
- 981251 (af62e8c): phpunit and phpunit (max PHP version) both fail in
ControllerTest::testLoggerReportsAccess, with "null is not null". ThefindOne()on the message the test just logged (ControllerTest.php:457) finds nothing. - 981129 (f7874ff): the same assertion fails, in phpunit (previous major) this time.
- 981222 (17e8545): phpunit (previous minor) crashed with exit code 255, before any test summary.
- On 2026-09-30, the same
ControllerTestassertion failed 4 pipelines of the #3626726: Ensure PHP 8.5 compatibility MR, one different phpunit job each time, the merge train pipeline included.
There are two independent causes:
- Random log messages: the test logs
randomString(32), then looks it up by exact match. When that string contains braces, the logger stores{x}as@x, like core's loggers do throughLogMessageParser, even without anxkey in the context. The lookup then finds nothing. Whether a run fails depends only on the random string, hence a different job each time. - Database not ready: neither the CI templates nor the runner wait for service containers to accept connections, so a slow MySQL start fails the job before any test runs.
Separately, CI installed development branches of dependencies (drush 12.x-dev and 13.x-dev, mongodb/mongodb v2.x-dev and v1.21.x-dev), because composer.json set "minimum-stability": "dev" and "prefer-stable": false. Test results then depended on whatever those branches contained that day.
Proposed resolution
Implemented in the MR, one commit per fix:
- Random log messages: the module keeps core's behavior, since it is meant as a drop-in replacement for core's logging.
ControllerTestderives the stored form of its random message with core'slogger.log_message_parserservice, and a newLoggerTest::testPlaceholderRewritepins that rewriting: matched and unmatched placeholders, and nested braces. Literal braces in core log messages are discussed in #2909805: LogMessageParser breaks messages containing braces. - Database not ready: every phpunit job waits for its database (MySQL, MariaDB or PostgreSQL) and for MongoDB with wait4x v3.7.2, verifying the downloaded archive against its published checksum.
- Development branches:
minimum-stabilityandprefer-stableare removed from bothcomposer.jsonfiles, so the CI templates' defaults apply.
Remaining tasks
- Review and merge.
User interface changes
None.
API changes
None.
Data model changes
None.
AI disclosure
This issue and its MR were AI-assisted.
Issue fork mongodb-3626739
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
Comment #2
fgmComment #4
fgmComment #5
fgmComment #7
fgmFixed in today's HEAD.