Page MenuHomePhabricator

Changes to cu_changes.sql causing jenkins tests failure
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Check this patch on Gerrit
  • Notice that ps 2 has passed jenkins tests but ps 3 and 4 failed
  • Notice that ps 3 only has some minor changes unrelated to CheckUser extension (actually the whole stuff has nothing to do with CU) and ps 4 is merely a rebase
  • Notice that the log contains the following
  • Tried to recheck several times but with no luck
16:55:13 Creating cu_changes table...RuntimeException from line 5036 of /workspace/src/includes/libs/rdbms/database/Database.php: Could not open "/workspace/src/extensions/CheckUser/src/../schema/sqlite/cu_changes.sql"
16:55:13 #0 /workspace/src/includes/installer/DatabaseUpdater.php(706): Wikimedia\Rdbms\Database->sourceFile('/workspace/src/...')
16:55:13 #1 /workspace/src/includes/installer/DatabaseUpdater.php(751): DatabaseUpdater->applyPatch('/workspace/src/...', true, 'Creating cu_cha...')
16:55:13 #2 /workspace/src/includes/installer/DatabaseUpdater.php(535): DatabaseUpdater->addTable('cu_changes', '/workspace/src/...', true)
16:55:13 #3 /workspace/src/includes/installer/DatabaseUpdater.php(503): DatabaseUpdater->runUpdates(Array, true)
16:55:13 #4 /workspace/src/includes/installer/DatabaseInstaller.php(349): DatabaseUpdater->doUpdates(Array)
16:55:13 #5 /workspace/src/includes/installer/Installer.php(1680): DatabaseInstaller->createExtensionTables(Object(SqliteInstaller))
16:55:13 #6 /workspace/src/includes/installer/CliInstaller.php(211): Installer->performInstallation(Array, Array)
16:55:13 #7 /workspace/src/maintenance/install.php(144): CliInstaller->execute()
16:55:13 #8 /workspace/src/maintenance/doMaintenance.php(114): CommandLineInstaller->execute()
16:55:13 #9 /workspace/src/maintenance/install.php(205): require_once('/workspace/src/...')
16:55:13 #10 {main}
16:55:13 <<< Finish: Install MediaWiki, db=<quibble.backend.SQLite object at 0x7fb5a0333668> vendor=True, in 0.551 s

What happens?:
The error seems to be cu_changes.sql not found. After digging into recent patches, I found this patch merged several hours ago renamed this cu_changes.sql file and I doubt this caused problems on jenkins.

What should have happened instead?:
The patch should pass all the tests.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.: N/A

Event Timeline

hashar added subscribers: Umherirrender, Reedy, hashar.

Looks like CheckUser can't find the sqlite schema files:

Could not open "/workspace/src/extensions/CheckUser/src/../schema/sqlite/cu_changes.sql"

That would be due to becae0cf2ac909c7ab7ce43ed7e94775ac24c5c3 / https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CheckUser/+/787929

Somehow the CheckUser extension is not tested against Sqlite (it runs quibble-vendor-mysql-php72-noselenium-docker) and thus the change got merged just fine. AbuseFilter is tested with Sqlite (via the job quibble-vendor-sqlite-php72-noselenium-docker ) and ends up failing to install cause CheckUser is injected as a dependency of AbuseFilter.

I have looked at the CI configuration (integration/config), AbuseFilter is apparently the sole extension running Sqlite based jobs on CI. That was done by @Jdforrester-WMF via https://gerrit.wikimedia.org/r/c/integration/config/+/653121 for T251967: quibble-vendor-sqlite-php72-docker is broken by AbuseFilter. The reason is the task about adding Sqlite and PostgreSQL support to AbuseFilter T199544.

What we miss is enforcing Sqlite support to all dependencies of AbuseFilter which would be:

mediawiki/extensions/AbuseFilter
mediawiki/extensions/AntiSpoof
mediawiki/extensions/CentralAuth
mediawiki/extensions/CheckUser
mediawiki/extensions/Cite
mediawiki/extensions/CodeEditor
mediawiki/extensions/ConfirmEdit
mediawiki/extensions/Echo
mediawiki/extensions/EventBus
mediawiki/extensions/EventLogging
mediawiki/extensions/EventStreamConfig
mediawiki/extensions/FlaggedRevs
mediawiki/extensions/GuidedTour
mediawiki/extensions/MobileApp
mediawiki/extensions/MobileFrontend
mediawiki/extensions/ParserFunctions
mediawiki/extensions/Renameuser
mediawiki/extensions/Scribunto
mediawiki/extensions/SyntaxHighlight_GeSHi
mediawiki/extensions/TemplateData
mediawiki/extensions/VisualEditor
mediawiki/extensions/WikiEditor
mediawiki/extensions/WikimediaEvents

I guess we want to:

Change 790431 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/CheckUser@master] Hooks.php: Fix paths for SQLite

https://gerrit.wikimedia.org/r/790431

Change 790653 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/AbuseFilter@master] [DNM] Jenkins testing

https://gerrit.wikimedia.org/r/790653

Change 790431 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Hooks.php: Fix paths for SQLite

https://gerrit.wikimedia.org/r/790431

Zabe assigned this task to Reedy.
Zabe subscribed.

This was done inline with the work for abstract schema (T268540) and missed as single patch

Change 790653 abandoned by Umherirrender:

[mediawiki/extensions/AbuseFilter@master] [DNM] Jenkins testing

Reason:

cleanup

https://gerrit.wikimedia.org/r/790653