Page MenuHomePhabricator

Wikimedia\Rdbms\DBQueryError: Error 1054: Unknown column 'cul_reason' in 'field list'Function: IndexPager::buildQueryInfo (MediaWiki\CheckUser\CheckUser\Pagers\CheckUserLogPager)Query: SELECT cul_id,cul_timestamp,cul_reason,
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   Wikimedia\Rdbms\DBQueryError: Error 1054: Unknown column 'cul_reason' in 'field list'
Function: IndexPager::buildQueryInfo (MediaWiki\CheckUser\CheckUser\Pagers\CheckUserLogPager)
Query: SELECT  cul_id,cul_timestamp,cul_reason,
exception.trace
from /srv/mediawiki/php-1.40.0-wmf.21/includes/libs/rdbms/database/Database.php(1534)
#0 /srv/mediawiki/php-1.40.0-wmf.21/includes/libs/rdbms/database/Database.php(1518): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /srv/mediawiki/php-1.40.0-wmf.21/includes/libs/rdbms/database/Database.php(1492): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 /srv/mediawiki/php-1.40.0-wmf.21/includes/libs/rdbms/database/Database.php(865): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#3 /srv/mediawiki/php-1.40.0-wmf.21/includes/libs/rdbms/database/Database.php(1629): Wikimedia\Rdbms\Database->query(string, string, integer)
#4 /srv/mediawiki/php-1.40.0-wmf.21/includes/libs/rdbms/database/DBConnRef.php(119): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#5 /srv/mediawiki/php-1.40.0-wmf.21/includes/libs/rdbms/database/DBConnRef.php(339): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#6 /srv/mediawiki/php-1.40.0-wmf.21/includes/pager/IndexPager.php(459): Wikimedia\Rdbms\DBConnRef->select(array, array, array, string, array, array)
#7 /srv/mediawiki/php-1.40.0-wmf.21/includes/pager/IndexPager.php(281): IndexPager->reallyDoQuery(string, integer, boolean)
#8 /srv/mediawiki/php-1.40.0-wmf.21/includes/pager/IndexPager.php(848): IndexPager->doQuery()
#9 /srv/mediawiki/php-1.40.0-wmf.21/includes/pager/ReverseChronologicalPager.php(154): IndexPager->isNavigationBarShown()
#10 /srv/mediawiki/php-1.40.0-wmf.21/extensions/CheckUser/src/CheckUser/SpecialCheckUserLog.php(145): ReverseChronologicalPager->getNavigationBar()
#11 /srv/mediawiki/php-1.40.0-wmf.21/includes/specialpage/SpecialPage.php(700): MediaWiki\CheckUser\CheckUser\SpecialCheckUserLog->execute(NULL)
#12 /srv/mediawiki/php-1.40.0-wmf.21/includes/specialpage/SpecialPageFactory.php(1458): SpecialPage->run(NULL)
#13 /srv/mediawiki/php-1.40.0-wmf.21/includes/MediaWiki.php(322): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#14 /srv/mediawiki/php-1.40.0-wmf.21/includes/MediaWiki.php(915): MediaWiki->performRequest()
#15 /srv/mediawiki/php-1.40.0-wmf.21/includes/MediaWiki.php(571): MediaWiki->main()
#16 /srv/mediawiki/php-1.40.0-wmf.21/index.php(50): MediaWiki->run()
#17 /srv/mediawiki/php-1.40.0-wmf.21/index.php(46): wfIndexMain()
#18 /srv/mediawiki/w/index.php(3): require(string)
#19 {main}
Impact
Notes

Details

MediaWiki Version
1.40.0-wmf.21
Request URL
https://en.wikipedia.org/wiki/Special:CheckUserLog

Related Objects

Event Timeline

Zabe triaged this task as Unbreak Now! priority.Feb 8 2023, 10:20 AM

Change 887748 had a related patch set uploaded (by Zabe; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@wmf/1.40.0-wmf.21] Remove cul_reason comment table migration code

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

Change 887748 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@wmf/1.40.0-wmf.21] Remove cul_reason comment table migration code

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

Mentioned in SAL (#wikimedia-operations) [2023-02-08T10:49:46Z] <zabe@deploy1002> Started scap: Backport for [[gerrit:887748|Remove cul_reason comment table migration code (T233004 T329151)]]

Mentioned in SAL (#wikimedia-operations) [2023-02-08T10:51:36Z] <zabe@deploy1002> zabe: Backport for [[gerrit:887748|Remove cul_reason comment table migration code (T233004 T329151)]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-02-08T10:57:52Z] <zabe@deploy1002> Finished scap: Backport for [[gerrit:887748|Remove cul_reason comment table migration code (T233004 T329151)]] (duration: 08m 05s)

Zabe claimed this task.

btw. this was UBN since it completly broke Special:CheckUserLog

Oh. I see what happened here. cul_reason was selected regardless of the comment migration stage and this selection was removed in the now backported commit. I guess that one of the wikis which still runs wmf.21 had their cul_reason column removed and wmf.22 hasn't yet made it out. Apologies for not seeing this one. Good thing is that it shouldn't have caused any loss of data (because the error was only to do with reading not writing). Thanks for the quick fix.