Page MenuHomePhabricator

Wikimedia\Rdbms\DBQueryError: Error 1146: Table 'labtestwiki.oathauth_devices' doesn't exist
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   Wikimedia\Rdbms\DBQueryError: Error 1146: Table 'labtestwiki.oathauth_devices' doesn't exist
Function: MediaWiki\Extension\OATHAuth\OATHUserRepository::findByUser
Query: SELECT  oad_data,oat_name  FROM `oathauth_devices` JOIN `
error.stack_trace
from /srv/mediawiki/php-1.41.0-wmf.28/includes/libs/rdbms/database/Database.php(1236)
#0 /srv/mediawiki/php-1.41.0-wmf.28/includes/libs/rdbms/database/Database.php(1220): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /srv/mediawiki/php-1.41.0-wmf.28/includes/libs/rdbms/database/Database.php(1194): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 /srv/mediawiki/php-1.41.0-wmf.28/includes/libs/rdbms/database/Database.php(679): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#3 /srv/mediawiki/php-1.41.0-wmf.28/includes/libs/rdbms/database/Database.php(1383): Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)
#4 /srv/mediawiki/php-1.41.0-wmf.28/includes/libs/rdbms/database/DBConnRef.php(119): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#5 /srv/mediawiki/php-1.41.0-wmf.28/includes/libs/rdbms/database/DBConnRef.php(351): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#6 /srv/mediawiki/php-1.41.0-wmf.28/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(707): Wikimedia\Rdbms\DBConnRef->select(array, array, array, string, array, array)
#7 /srv/mediawiki/php-1.41.0-wmf.28/extensions/OATHAuth/src/OATHUserRepository.php(118): Wikimedia\Rdbms\SelectQueryBuilder->fetchResultSet()
#8 /srv/mediawiki/php-1.41.0-wmf.28/extensions/OATHAuth/src/Api/Module/ApiOATHValidate.php(65): MediaWiki\Extension\OATHAuth\OATHUserRepository->findByUser(MediaWiki\User\User)
#9 /srv/mediawiki/php-1.41.0-wmf.28/includes/api/ApiMain.php(1931): MediaWiki\Extension\OATHAuth\Api\Module\ApiOATHValidate->execute()
#10 /srv/mediawiki/php-1.41.0-wmf.28/includes/api/ApiMain.php(908): ApiMain->executeAction()
#11 /srv/mediawiki/php-1.41.0-wmf.28/includes/api/ApiMain.php(879): ApiMain->executeActionWithErrorHandling()
#12 /srv/mediawiki/php-1.41.0-wmf.28/api.php(95): ApiMain->execute()
#13 /srv/mediawiki/php-1.41.0-wmf.28/api.php(48): wfApiMain()
#14 /srv/mediawiki/w/api.php(3): require(string)
#15 {main}
Impact
Notes

Seeing a number of these in 1.41.0-wmf.28 (T345889).

Details

Request URL
https://labtestwikitech.wikimedia.org/w/api.php

Event Timeline

Probably caused by https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/961236 but new DB table not being rolled out everywhere? T330502 claims it was done everywhere, but labstestwiki is a mess.

brennen renamed this task from Wikimedia\Rdbms\DBQueryError: Error 1146: Table 'labtestwiki.oathauth_devices' doesn't existFunction: MediaWiki\Extension\OATHAuth\OATHUserRepository::findByUserQuery: SELECT oad_data,oat_name FROM `oathauth_devices` JOIN ` to Wikimedia\Rdbms\DBQueryError: Error 1146: Table 'labtestwiki.oathauth_devices' doesn't exist.Sep 28 2023, 7:58 PM
brennen added a project: User-brennen.
brennen moved this task from Backlog to Logs/Train on the User-brennen board.

Mentioned in SAL (#wikimedia-operations) [2023-09-28T20:11:35Z] <taavi> create new oathauth tables on labtestwikitech and run taavi@cloudweb2002-dev ~ $ mwscript extensions/OATHAuth/maintenance/UpdateForMultipleDevicesSupport.php labtestwiki, fixes T347627

Yeah, I'm fairly sure labteswikitech was down when running these schema changes on Wikitech a while ago, and I just didn't bother dealing with it back then. I created the new tables and ran the migration script.