Page MenuHomePhabricator

InvalidArgumentException: Wikimedia\Rdbms\Database::makeList: empty input for field recentchanges_actor.actor_user
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   InvalidArgumentException: Wikimedia\Rdbms\Database::makeList: empty input for field recentchanges_actor.actor_user
exception.trace
from /srv/mediawiki/php-1.38.0-wmf.5/includes/libs/rdbms/database/Database.php(2690)
#0 /srv/mediawiki/php-1.38.0-wmf.5/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->makeList(array, integer)
#1 /srv/mediawiki/php-1.38.0-wmf.5/includes/libs/rdbms/database/DBConnRef.php(390): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#2 /srv/mediawiki/php-1.38.0-wmf.5/extensions/GrowthExperiments/includes/Mentorship/MentorFilterHooks.php(103): Wikimedia\Rdbms\DBConnRef->makeList(array, integer)
#3 /srv/mediawiki/php-1.38.0-wmf.5/includes/changes/ChangesListStringOptionsFilterGroup.php(213): GrowthExperiments\Mentorship\MentorFilterHooks->GrowthExperiments\Mentorship\{closure}(string, RequestContext, Wikimedia\Rdbms\DBConnRef, array, array, array, array, array, array)
#4 /srv/mediawiki/php-1.38.0-wmf.5/includes/specialpage/ChangesListSpecialPage.php(1519): ChangesListStringOptionsFilterGroup->modifyQuery(Wikimedia\Rdbms\DBConnRef, SpecialRecentChanges, array, array, array, array, array, FormOptions, boolean)
#5 /srv/mediawiki/php-1.38.0-wmf.5/includes/specialpage/ChangesListSpecialPage.php(1016): ChangesListSpecialPage->buildQuery(array, array, array, array, array, FormOptions)
#6 /srv/mediawiki/php-1.38.0-wmf.5/includes/specialpage/ChangesListSpecialPage.php(617): ChangesListSpecialPage->getRows()
#7 /srv/mediawiki/php-1.38.0-wmf.5/includes/specials/SpecialRecentChanges.php(199): ChangesListSpecialPage->execute(NULL)
#8 /srv/mediawiki/php-1.38.0-wmf.5/includes/specialpage/SpecialPage.php(647): SpecialRecentChanges->execute(NULL)
#9 /srv/mediawiki/php-1.38.0-wmf.5/includes/specialpage/SpecialPageFactory.php(1377): SpecialPage->run(NULL)
#10 /srv/mediawiki/php-1.38.0-wmf.5/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#11 /srv/mediawiki/php-1.38.0-wmf.5/includes/MediaWiki.php(925): MediaWiki->performRequest()
#12 /srv/mediawiki/php-1.38.0-wmf.5/includes/MediaWiki.php(559): MediaWiki->main()
#13 /srv/mediawiki/php-1.38.0-wmf.5/index.php(53): MediaWiki->run()
#14 /srv/mediawiki/php-1.38.0-wmf.5/index.php(46): wfIndexMain()
#15 /srv/mediawiki/w/index.php(3): require(string)
#16 {main}
Impact

For users with no starred mentees, the "Your starred mentees" filters errors out. Same applies also for "Your unstarred mentees", but that's far more unlikely to happen.

Notes

MentorFilterHooks.php:103 is applied unconditionally, regardless of the number of IDs in $targetIds (which may be zero).

Details

Request URL
https://cs.wikipedia.org/wiki/Speci%C3%A1ln%C3%AD:Posledn%C3%AD_zm%C4%9Bny?hidebots=*&hidecategorization=*&hideWikibase=*&mentorship=*&limit=*&days=*&urlversion=*&action=render&enhanced=*

Event Timeline

Urbanecm_WMF created this task.

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

[mediawiki/extensions/GrowthExperiments@master] MentorFilterHooks: Account for no matching users

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

Urbanecm_WMF added a subscriber: Tgr.

@Tgr FYI, as it's a side-effect of a feature you created :).

Change 734726 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] MentorFilterHooks: Account for no matching users

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.38.0-wmf.5] MentorFilterHooks: Account for no matching users

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.38.0-wmf.6] MentorFilterHooks: Account for no matching users

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

Change 734765 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.38.0-wmf.5] MentorFilterHooks: Account for no matching users

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

Change 734906 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.38.0-wmf.6] MentorFilterHooks: Account for no matching users

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

Mentioned in SAL (#wikimedia-operations) [2021-10-27T10:10:11Z] <urbanecm@deploy1002> Synchronized php-1.38.0-wmf.5/extensions/GrowthExperiments/: rEGRE305e97a7d1b3, rEGRE667a4bede4a5: GrowthExperiments backports (T293434, T294386) (duration: 01m 04s)

Mentioned in SAL (#wikimedia-operations) [2021-10-27T10:11:58Z] <urbanecm@deploy1002> Synchronized php-1.38.0-wmf.6/extensions/GrowthExperiments/: rEGRE305e97a7d1b3, rEGREb9eaa208aa59: GrowthExperiments backports (T293434, T294386) (duration: 01m 04s)

So...the change I made indeed removed the fatal, but it still doesn't behave like it is supposed to.

Expected behavior: When only "Your starred mentees" is selected, and user has no starred mentees, Special:RecentChanges is empty.

Current behavior: When only "Your starred mentees" is selected, and user has no starred mentees, Special:RecentChanges ignores the filter.

I'm closing this task, as the fatal is gone, but I'm going to fill a follow-up for future investigation.