When promoting group0 wikis to MW-1.40-notes (1.40.0-wmf.6; 2022-10-17) , we had errors Unknown column 'cuc_private' in 'field list' being logged from three different hooks:
- MediaWiki\CheckUser\Hooks::updateCheckUserData
- MediaWiki\CheckUser\Hooks::onAuthManagerLoginAuthenticateAudit
- MediaWiki\CheckUser\Hooks::onLocalUserCreated
The reason is our oldest wikis databases never had the cuc_private Schema-change-in-production applied. From T233004#5495636 and below:
There is actually not cuc_private column from what @Marostegui can see on enwiki.
@Reedy guesses it's not a feature we use with $wgCUPublicKey being "" by default.
The probable root cause is https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CheckUser/+/824746/7/src/Hooks.php which inconditonally inserts cuc_private.
- mwversion: 1.40.0-wmf.6
MediaWiki\CheckUser\Hooks::onLocalUserCreated
- reqId: 811820ba-fab7-4177-9ea7-ff61e089dfc1
- Find reqId in Logstash
[{reqId}] {exception_url} Wikimedia\Rdbms\DBQueryError: Error 1054: Unknown column 'cuc_private' in 'field list' Function: MediaWiki\CheckUser\Hooks::onLocalUserCreated Query: INSERT INTO `cu_changes` (cuc_page_id,cuc_namespace,cuc_minor,cuc_title,cuc_u
from /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(1558) #0 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(1542): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string) #1 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(1516): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string) #2 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(892): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #3 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(1775): Wikimedia\Rdbms\Database->query(string, string, integer) #4 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->insert(string, array, string) #5 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/DBConnRef.php(381): Wikimedia\Rdbms\DBConnRef->__call(string, array) #6 /srv/mediawiki/php-1.40.0-wmf.6/extensions/CheckUser/src/Hooks.php(283): Wikimedia\Rdbms\DBConnRef->insert(string, array, string) #7 /srv/mediawiki/php-1.40.0-wmf.6/extensions/CheckUser/src/Hooks.php(375): MediaWiki\CheckUser\Hooks::insertIntoCuChangesTable(array, string, User) #8 /srv/mediawiki/php-1.40.0-wmf.6/includes/HookContainer/HookContainer.php(160): MediaWiki\CheckUser\Hooks->onLocalUserCreated(User, boolean) #9 /srv/mediawiki/php-1.40.0-wmf.6/includes/HookContainer/HookRunner.php(2408): MediaWiki\HookContainer\HookContainer->run(string, array) #10 /srv/mediawiki/php-1.40.0-wmf.6/includes/auth/AuthManager.php(1581): MediaWiki\HookContainer\HookRunner->onLocalUserCreated(User, boolean) #11 /srv/mediawiki/php-1.40.0-wmf.6/includes/auth/AuthManager.php(1294): MediaWiki\Auth\AuthManager->continueAccountCreation(array) #12 /srv/mediawiki/php-1.40.0-wmf.6/includes/specialpage/AuthManagerSpecialPage.php(376): MediaWiki\Auth\AuthManager->beginAccountCreation(User, array, string) #13 /srv/mediawiki/php-1.40.0-wmf.6/includes/specialpage/AuthManagerSpecialPage.php(504): AuthManagerSpecialPage->performAuthenticationStep(string, array) #14 /srv/mediawiki/php-1.40.0-wmf.6/includes/htmlform/HTMLForm.php(730): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm) #15 /srv/mediawiki/php-1.40.0-wmf.6/includes/specialpage/AuthManagerSpecialPage.php(435): HTMLForm->trySubmit() #16 /srv/mediawiki/php-1.40.0-wmf.6/includes/specialpage/LoginSignupSpecialPage.php(320): AuthManagerSpecialPage->trySubmit() #17 /srv/mediawiki/php-1.40.0-wmf.6/includes/specialpage/SpecialPage.php(701): LoginSignupSpecialPage->execute(NULL) #18 /srv/mediawiki/php-1.40.0-wmf.6/includes/specialpage/SpecialPageFactory.php(1451): SpecialPage->run(NULL) #19 /srv/mediawiki/php-1.40.0-wmf.6/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext) #20 /srv/mediawiki/php-1.40.0-wmf.6/includes/MediaWiki.php(904): MediaWiki->performRequest() #21 /srv/mediawiki/php-1.40.0-wmf.6/includes/MediaWiki.php(562): MediaWiki->main() #22 /srv/mediawiki/php-1.40.0-wmf.6/index.php(50): MediaWiki->run() #23 /srv/mediawiki/php-1.40.0-wmf.6/index.php(46): wfIndexMain() #24 /srv/mediawiki/w/index.php(3): require(string) #25 {main}
MediaWiki\CheckUser\Hooks::onAuthManagerLoginAuthenticateAudit
- reqId: 1ca5ef62-c01c-48e6-a296-fb05fb7ec35e
- Find reqId in Logstash
[{reqId}] {exception_url} Wikimedia\Rdbms\DBQueryError: Error 1054: Unknown column 'cuc_private' in 'field list' Function: MediaWiki\CheckUser\Hooks::onAuthManagerLoginAuthenticateAudit Query: INSERT INTO `cu_changes` (cuc_page_id,cuc_namespace,cuc_mino
from /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(1558) #0 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(1542): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string) #1 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(1516): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string) #2 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(892): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #3 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(1775): Wikimedia\Rdbms\Database->query(string, string, integer) #4 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->insert(string, array, string) #5 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/DBConnRef.php(381): Wikimedia\Rdbms\DBConnRef->__call(string, array) #6 /srv/mediawiki/php-1.40.0-wmf.6/extensions/CheckUser/src/Hooks.php(283): Wikimedia\Rdbms\DBConnRef->insert(string, array, string) #7 /srv/mediawiki/php-1.40.0-wmf.6/extensions/CheckUser/src/Hooks.php(468): MediaWiki\CheckUser\Hooks::insertIntoCuChangesTable(array, string, MediaWiki\User\UserIdentityValue) #8 /srv/mediawiki/php-1.40.0-wmf.6/includes/HookContainer/HookContainer.php(160): MediaWiki\CheckUser\Hooks->onAuthManagerLoginAuthenticateAudit(MediaWiki\Auth\AuthenticationResponse, User, string, array) #9 /srv/mediawiki/php-1.40.0-wmf.6/includes/HookContainer/HookRunner.php(890): MediaWiki\HookContainer\HookContainer->run(string, array) #10 /srv/mediawiki/php-1.40.0-wmf.6/includes/auth/AuthManager.php(434): MediaWiki\HookContainer\HookRunner->onAuthManagerLoginAuthenticateAudit(MediaWiki\Auth\AuthenticationResponse, NULL, string, array) #11 /srv/mediawiki/php-1.40.0-wmf.6/includes/specialpage/AuthManagerSpecialPage.php(372): MediaWiki\Auth\AuthManager->beginAuthentication(array, string) #12 /srv/mediawiki/php-1.40.0-wmf.6/includes/specialpage/AuthManagerSpecialPage.php(504): AuthManagerSpecialPage->performAuthenticationStep(string, array) #13 /srv/mediawiki/php-1.40.0-wmf.6/includes/htmlform/HTMLForm.php(730): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm) #14 /srv/mediawiki/php-1.40.0-wmf.6/includes/specialpage/AuthManagerSpecialPage.php(435): HTMLForm->trySubmit() #15 /srv/mediawiki/php-1.40.0-wmf.6/includes/specialpage/LoginSignupSpecialPage.php(320): AuthManagerSpecialPage->trySubmit() #16 /srv/mediawiki/php-1.40.0-wmf.6/includes/specialpage/SpecialPage.php(701): LoginSignupSpecialPage->execute(NULL) #17 /srv/mediawiki/php-1.40.0-wmf.6/includes/specialpage/SpecialPageFactory.php(1451): SpecialPage->run(NULL) #18 /srv/mediawiki/php-1.40.0-wmf.6/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext) #19 /srv/mediawiki/php-1.40.0-wmf.6/includes/MediaWiki.php(904): MediaWiki->performRequest() #20 /srv/mediawiki/php-1.40.0-wmf.6/includes/MediaWiki.php(562): MediaWiki->main() #21 /srv/mediawiki/php-1.40.0-wmf.6/index.php(50): MediaWiki->run() #22 /srv/mediawiki/php-1.40.0-wmf.6/index.php(46): wfIndexMain() #23 /srv/mediawiki/w/index.php(3): require(string) #24 {main}
MediaWiki\CheckUser\Hooks::updateCheckUserData
- mwversion: 1.40.0-wmf.6
- reqId: fe3b43df-9e3a-471f-a601-e0b366d9c778
- Find reqId in Logstash
[{reqId}] {exception_url} Wikimedia\Rdbms\DBQueryError: Error 1054: Unknown column 'cuc_private' in 'field list' Function: MediaWiki\CheckUser\Hooks::updateCheckUserData Query: INSERT INTO `cu_changes` (cuc_page_id,cuc_namespace,cuc_minor,cuc_title,cuc_
from /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(1558) #0 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(1542): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string) #1 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(1516): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string) #2 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(892): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #3 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/Database.php(1775): Wikimedia\Rdbms\Database->query(string, string, integer) #4 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->insert(string, array, string) #5 /srv/mediawiki/php-1.40.0-wmf.6/includes/libs/rdbms/database/DBConnRef.php(381): Wikimedia\Rdbms\DBConnRef->__call(string, array) #6 /srv/mediawiki/php-1.40.0-wmf.6/extensions/CheckUser/src/Hooks.php(283): Wikimedia\Rdbms\DBConnRef->insert(string, array, string) #7 /srv/mediawiki/php-1.40.0-wmf.6/extensions/CheckUser/src/Hooks.php(204): MediaWiki\CheckUser\Hooks::insertIntoCuChangesTable(array, string, MediaWiki\User\UserIdentityValue) #8 /srv/mediawiki/php-1.40.0-wmf.6/extensions/CheckUser/src/Hooks.php(933): MediaWiki\CheckUser\Hooks::updateCheckUserData(RecentChange) #9 /srv/mediawiki/php-1.40.0-wmf.6/includes/HookContainer/HookContainer.php(160): MediaWiki\CheckUser\Hooks->onRecentChange_save(RecentChange) #10 /srv/mediawiki/php-1.40.0-wmf.6/includes/HookContainer/HookRunner.php(3196): MediaWiki\HookContainer\HookContainer->run(string, array) #11 /srv/mediawiki/php-1.40.0-wmf.6/includes/changes/RecentChange.php(469): MediaWiki\HookContainer\HookRunner->onRecentChange_save(RecentChange) #12 /srv/mediawiki/php-1.40.0-wmf.6/includes/changes/RecentChange.php(786): RecentChange->save() #13 /srv/mediawiki/php-1.40.0-wmf.6/includes/deferred/MWCallableUpdate.php(38): RecentChange::{closure}() #14 /srv/mediawiki/php-1.40.0-wmf.6/includes/deferred/DeferredUpdates.php(474): MWCallableUpdate->doUpdate() #15 /srv/mediawiki/php-1.40.0-wmf.6/includes/deferred/DeferredUpdates.php(399): DeferredUpdates::attemptUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti) #16 /srv/mediawiki/php-1.40.0-wmf.6/includes/deferred/DeferredUpdates.php(214): DeferredUpdates::run(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti, Monolog\Logger, BufferingStatsdDataFactory, MediaWiki\JobQueue\JobQueueGroupFactory, string) #17 /srv/mediawiki/php-1.40.0-wmf.6/includes/deferred/DeferredUpdatesScope.php(267): DeferredUpdates::{closure}(MWCallableUpdate, integer) #18 /srv/mediawiki/php-1.40.0-wmf.6/includes/deferred/DeferredUpdatesScope.php(196): DeferredUpdatesScope->processStageQueue(integer, integer, Closure) #19 /srv/mediawiki/php-1.40.0-wmf.6/includes/deferred/DeferredUpdates.php(235): DeferredUpdatesScope->processUpdates(integer, Closure) #20 /srv/mediawiki/php-1.40.0-wmf.6/extensions/EventBus/includes/JobExecutor.php(105): DeferredUpdates::doUpdates() #21 /srv/mediawiki/rpc/RunSingleJob.php(77): MediaWiki\Extension\EventBus\JobExecutor->execute(array) #22 {main}