Page MenuHomePhabricator

updateMenteeData.php fatals for testwiki
Closed, ResolvedPublicPRODUCTION ERROR

Description

Today, I discovered that this happens with updateMenteeData.php at testwiki:

[urbanecm@mwmaint1002 /srv/mediawiki/php]$ mwscript extensions/GrowthExperiments/maintenance/updateMenteeData.php --wiki=testwiki
InvalidArgumentException from line 2690 of /srv/mediawiki/php-1.37.0-wmf.23/includes/libs/rdbms/database/Database.php: Wikimedia\Rdbms\Database::makeList: empty input for field actor_rev_user.actor_user
#0 /srv/mediawiki/php-1.37.0-wmf.23/includes/libs/rdbms/database/Database.php(2071): Wikimedia\Rdbms\Database->makeList(Array, 1)
#1 /srv/mediawiki/php-1.37.0-wmf.23/includes/libs/rdbms/database/Database.php(2010): Wikimedia\Rdbms\Database->selectSQLText(Array, Array, Array, 'GrowthExperimen...', Array, Array)
#2 /srv/mediawiki/php-1.37.0-wmf.23/extensions/GrowthExperiments/includes/MentorDashboard/MenteeOverview/UncachedMenteeOverviewDataProvider.php(159): Wikimedia\Rdbms\Database->select(Array, Array, Array, 'GrowthExperimen...', Array, Array)
#3 /srv/mediawiki/php-1.37.0-wmf.23/extensions/GrowthExperiments/includes/MentorDashboard/MenteeOverview/UncachedMenteeOverviewDataProvider.php(175): GrowthExperiments\MentorDashboard\MenteeOverview\UncachedMenteeOverviewDataProvider->getLastEditTimestampForUsers(Array)
#4 /srv/mediawiki/php-1.37.0-wmf.23/extensions/GrowthExperiments/includes/MentorDashboard/MenteeOverview/UncachedMenteeOverviewDataProvider.php(136): GrowthExperiments\MentorDashboard\MenteeOverview\UncachedMenteeOverviewDataProvider->filterMenteesByLastEdit(Array)
#5 /srv/mediawiki/php-1.37.0-wmf.23/extensions/GrowthExperiments/includes/MentorDashboard/MenteeOverview/UncachedMenteeOverviewDataProvider.php(197): GrowthExperiments\MentorDashboard\MenteeOverview\UncachedMenteeOverviewDataProvider->getFilteredMenteesForMentor(Object(User))
#6 /srv/mediawiki/php-1.37.0-wmf.23/extensions/GrowthExperiments/maintenance/updateMenteeData.php(106): GrowthExperiments\MentorDashboard\MenteeOverview\UncachedMenteeOverviewDataProvider->getFormattedDataForMentor(Object(User))
#7 /srv/mediawiki/php-1.37.0-wmf.23/maintenance/doMaintenance.php(108): GrowthExperiments\Maintenance\UpdateMenteeData->execute()
#8 /srv/mediawiki/php-1.37.0-wmf.23/extensions/GrowthExperiments/maintenance/updateMenteeData.php(200): require_once('/srv/mediawiki/...')
#9 /srv/mediawiki/multiversion/MWScript.php(116): require_once('/srv/mediawiki/...')
#10 {main}
[urbanecm@mwmaint1002 /srv/mediawiki/php]$

I'm not sure why. Might be related to some user not having any mentees?

Event Timeline

It looks so:

[urbanecm@mwmaint1002 /srv/mediawiki/php]$ mwscript shell.php testwiki
Psy Shell v0.10.5 (PHP 7.2.34-18+0~20210223.60+debian10~1.gbpb21322+wmf1 — cli) by Justin Hileman
>>> $mentors = \MediaWiki\MediaWikiServices::getInstance()->get('GrowthExperimentsMentorManager')->getMentors()
=> [
     "Aseleste",
     "Geraki",
     "MMiller (WMF)",
     "Martin Urbanec (WMF)",
     "NMW03",
     "OTichonova (WMF)",
     "RHo (WMF)",
     "Suffusion of Yellow",
     "Sungodtemple",
     "Tgr (WMF)",
     "Trizek (WMF)",
     "ValeJappo",
     "Wargo",
     "Yahya",
     "Zilant17",
     "Xaosflux",
   ]
>>> $store = \MediaWiki\MediaWikiServices::getInstance()->get('GrowthExperimentsMentorStore')
=> GrowthExperiments\Mentorship\Store\MultiWriteMentorStore {#5812}
>>> foreach($mentors as $mentorName) {
... $mentor = User::newFromName($mentorName);
... $mentees = $store->getMenteesByMentor($mentor);
... if ($mentees == []) {
... echo("$mentorName has zero mentees");
... }
...
... }
Xaosflux has zero mentees⏎
>>> ^D
Exit:  Ctrl+D
[urbanecm@mwmaint1002 /srv/mediawiki/php]$

Temporarily workarounded by: 17:17, 15 September 2021 Martin Urbanec (WMF) talk contribs block set Xaosflux as the mentor of Martin Urbanec (WMF) (previous mentor Martin Urbanec) (to workaround T291088), but should still be properly fixed.

Change 721338 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] UncachedMenteeOverviewDataProvider: Do not fatal with zero mentees

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

thcipriani changed the subtype of this task from "Task" to "Production Error".Wed, Sep 15, 6:49 PM
thcipriani moved this task from Untriaged to Sep 2021 on the Wikimedia-production-error board.

Change 721338 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] UncachedMenteeOverviewDataProvider: Do not fatal with zero mentees

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

Change 721318 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@wmf/1.37.0-wmf.23] UncachedMenteeOverviewDataProvider: Do not fatal with zero mentees

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

Change 721319 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@wmf/1.37.0-wmf.21] UncachedMenteeOverviewDataProvider: Do not fatal with zero mentees

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

Change 721319 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.37.0-wmf.21] UncachedMenteeOverviewDataProvider: Do not fatal with zero mentees

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

Change 721318 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.37.0-wmf.23] UncachedMenteeOverviewDataProvider: Do not fatal with zero mentees

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

Boldly resolving:

[urbanecm@mwmaint1002 ~]$ mwscript extensions/GrowthExperiments/maintenance/updateMenteeData.php --wiki=testwiki
InvalidArgumentException from line 2690 of /srv/mediawiki/php-1.37.0-wmf.23/includes/libs/rdbms/database/Database.php: Wikimedia\Rdbms\Database::makeList: empty input for field actor_rev_user.actor_user
#0 /srv/mediawiki/php-1.37.0-wmf.23/includes/libs/rdbms/database/Database.php(2071): Wikimedia\Rdbms\Database->makeList(Array, 1)
#1 /srv/mediawiki/php-1.37.0-wmf.23/includes/libs/rdbms/database/Database.php(2010): Wikimedia\Rdbms\Database->selectSQLText(Array, Array, Array, 'GrowthExperimen...', Array, Array)
#2 /srv/mediawiki/php-1.37.0-wmf.23/extensions/GrowthExperiments/includes/MentorDashboard/MenteeOverview/UncachedMenteeOverviewDataProvider.php(159): Wikimedia\Rdbms\Database->select(Array, Array, Array, 'GrowthExperimen...', Array, Array)
#3 /srv/mediawiki/php-1.37.0-wmf.23/extensions/GrowthExperiments/includes/MentorDashboard/MenteeOverview/UncachedMenteeOverviewDataProvider.php(175): GrowthExperiments\MentorDashboard\MenteeOverview\UncachedMenteeOverviewDataProvider->getLastEditTimestampForUsers(Array)
#4 /srv/mediawiki/php-1.37.0-wmf.23/extensions/GrowthExperiments/includes/MentorDashboard/MenteeOverview/UncachedMenteeOverviewDataProvider.php(136): GrowthExperiments\MentorDashboard\MenteeOverview\UncachedMenteeOverviewDataProvider->filterMenteesByLastEdit(Array)
#5 /srv/mediawiki/php-1.37.0-wmf.23/extensions/GrowthExperiments/includes/MentorDashboard/MenteeOverview/UncachedMenteeOverviewDataProvider.php(197): GrowthExperiments\MentorDashboard\MenteeOverview\UncachedMenteeOverviewDataProvider->getFilteredMenteesForMentor(Object(User))
#6 /srv/mediawiki/php-1.37.0-wmf.23/extensions/GrowthExperiments/maintenance/updateMenteeData.php(106): GrowthExperiments\MentorDashboard\MenteeOverview\UncachedMenteeOverviewDataProvider->getFormattedDataForMentor(Object(User))
#7 /srv/mediawiki/php-1.37.0-wmf.23/maintenance/doMaintenance.php(108): GrowthExperiments\Maintenance\UpdateMenteeData->execute()
#8 /srv/mediawiki/php-1.37.0-wmf.23/extensions/GrowthExperiments/maintenance/updateMenteeData.php(200): require_once('/srv/mediawiki/...')
#9 /srv/mediawiki/multiversion/MWScript.php(116): require_once('/srv/mediawiki/...')
#10 {main}
[urbanecm@mwmaint1002 ~]$ scap pull
11:47:30 Copying from deploy1002.eqiad.wmnet to mwmaint1002.eqiad.wmnet
11:47:30 Started rsync common
11:47:33 Finished rsync common (duration: 00m 02s)
11:47:33 Started scap-cdb-rebuild
11:47:33 Finished scap-cdb-rebuild (duration: 00m 00s)
11:47:33 Checking if php-fpm restart needed
[urbanecm@mwmaint1002 ~]$ mwscript extensions/GrowthExperiments/maintenance/updateMenteeData.php --wiki=testwiki
Done. Took 7 seconds.
[urbanecm@mwmaint1002 ~]$

appears it did its job.

Mentioned in SAL (#wikimedia-operations) [2021-09-16T11:49:33Z] <urbanecm@deploy1002> Synchronized php-1.37.0-wmf.23/extensions/GrowthExperiments/includes/MentorDashboard/MenteeOverview/UncachedMenteeOverviewDataProvider.php: 9e0f6f84240bf621e97806a94a0e786817001668: UncachedMenteeOverviewDataProvider: Do not fatal with zero mentees (T291088) (duration: 01m 04s)

Mentioned in SAL (#wikimedia-operations) [2021-09-16T11:51:46Z] <urbanecm@deploy1002> Synchronized php-1.37.0-wmf.21/extensions/GrowthExperiments/includes/MentorDashboard/MenteeOverview/UncachedMenteeOverviewDataProvider.php: 529f86c5a998820c32e7d7f2d952317080383e05: UncachedMenteeOverviewDataProvider: Do not fatal with zero mentees (T291088) (duration: 01m 04s)