Generated with the help of an LLM.
Problem/Motivation
Functional tests fail at random with a missing cache_file_parsing table. The daily PostgreSQL 18 pipeline on main has failed on this every day since 2026-10-28.
SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "public.test62018227cache_file_parsing" does not exist SQLSTATE[HY000]: General error: 1 no such table: test67007309.cache_file_parsing
Failing jobs:
ConfigImportCommandTest fails most often. Its setUp() calls copyConfig(), which reaches DatabaseBackend::invalidateMultiple() through FileStorage and CacheCollector. Other failures reach the bin through YamlRouteDiscovery and FileParsingCacheCollectorBase.
DatabaseBackend::catchException() rethrows the exception when tableExists() returns TRUE at the time of the check.
The daily PostgreSQL pipeline passed on 2026-10-20 and was skipped from 2026-10-21 to 2026-10-27. #3082239 changed pgsql/Schema.php on 2026-10-27.
Steps to reproduce
Run the functional test suite on PostgreSQL in CI. The failing test changes between runs.
Proposed resolution
To be determined.
Remaining tasks
- Find the cause.
- Fix it.
Issue fork drupal-3634917
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:
- 3634917-random-test-failure
changes, plain diff MR !17660
Comments
Comment #3
joelpittetGenerated with the help of an LLM.
The installer uses
MemoryBackendforcache.file_parsing. After installation, there is nocache_file_parsingtable.BrowserTestBase::initFrontPage()sends a request to the site. The site writes its cache collectors after it sends the response. At the same time, the test runner continues. The site write fails, and the site makes the table. In the test runner, a query fails before the table is there. ThentableExists()returnsTRUE, andDatabaseBackendthrows the exception again.Process ID logs show this sequence for each local failure. On PostgreSQL 18.6, all 6
ConfigImportCommandTestmethods fail in a single run. With concurrency 8, 5 of 48 methods fail. Ona36bfd1a715, the parent of #3082239: Forbid limited length primary and unique keys, allow only in indexes, 4 of 6 methods fail. #3594338: Add a command to import configuration addedConfigImportCommandTeston 2026-10-27.In
DatabaseBackend, these methods now do a failed query again if the table is there:setMultiple(),invalidateMultiple(),deleteMultiple()anddeleteAll(). A second failure goes to the caller. The new kernel test makes the table in aStatementExecutionFailureEventlistener. Without the fix, the test fails on PostgreSQL and SQLite. With the fix, 48 of 48 methods pass on both.Comment #4
smustgrave commentedSo looking at the MR this one actually uncovered a real bug then? May not be random test failure category now.
Comment #5
joelpittet@smustgrave it appeared random when I ran into it, I re-ran the job a few times and lucked out and got it through.
Comment #6
mondrakeIn my flow, I would first do #3622582: Cleanup database exceptions, the test failure in pgsql would remain, but that one would do neither better nor worse, then do #2371709: Move the on-demand-table creation into the database API, then #3568040: [PP-1] Convert *Storage() classes' ensureTableExists methods to use SchemaDefinition objects.
Comment #7
mondrakebtw the first two are criticals, and that is now more substantive
Comment #8
joelpittetFollowing the pattern or marking these critical
Comment #9
mondrakeC/P myself from Slack re #6,
Comment #10
mondrakeLGTM. Can we try re-running the failed SQLite job, and the mysqli pipeline too?
Comment #11
joelpittetThanks and yes I
willhave rerun the failed jobComment #16
catchI ran the mysqli pipeline but forgot to post back here.
Agreed we should get this in, the test coverage should help to ensure that the lazy table consolidation doesn't regress it too.
Committed/pushed to main and cherry-picked back through to 11.5.x, thanks!