Page MenuHomePhabricator

GrowthExperiments REL1_35 test fail with "no mentor available"
Open, MediumPublicBUG REPORT

Description

From https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/716947 :

22:20:09 mw-error.log:2021-09-06 05:13:04 266edf23ca17 wikidb: [6685c50fca073b5a6aabf2bc] /api.php?format=json   MWException from line 113 of /workspace/src/extensions/GrowthExperiments/includes/Mentor.php: Homepage Mentorship module: no mentor available for user NewUser-0.9135686845886051-Iñtërnâtiônàlizætiøn
22:20:09 mw-error.log:#0 /workspace/src/extensions/GrowthExperiments/includes/Mentor.php(44): GrowthExperiments\Mentor::selectMentor(User)
22:20:09 mw-error.log:#1 /workspace/src/extensions/GrowthExperiments/includes/HomepageHooks.php(423): GrowthExperiments\Mentor::newFromMentee(User, boolean)
22:20:09 mw-error.log:#2 /workspace/src/includes/HookContainer/HookContainer.php(329): GrowthExperiments\HomepageHooks::onLocalUserCreated(User, boolean)
22:20:09 mw-error.log:#3 /workspace/src/includes/HookContainer/HookContainer.php(132): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
22:20:09 mw-error.log:#4 /workspace/src/includes/HookContainer/HookRunner.php(2432): MediaWiki\HookContainer\HookContainer->run(string, array)
22:20:09 mw-error.log:#5 /workspace/src/includes/auth/AuthManager.php(1446): MediaWiki\HookContainer\HookRunner->onLocalUserCreated(User, boolean)
22:20:09 mw-error.log:#6 /workspace/src/includes/auth/AuthManager.php(1163): MediaWiki\Auth\AuthManager->continueAccountCreation(array)
22:20:09 mw-error.log:#7 /workspace/src/includes/api/ApiAMCreateAccount.php(94): MediaWiki\Auth\AuthManager->beginAccountCreation(User, array, string)
22:20:09 mw-error.log:#8 /workspace/src/includes/api/ApiMain.php(1593): ApiAMCreateAccount->execute()
22:20:09 mw-error.log:#9 /workspace/src/includes/api/ApiMain.php(529): ApiMain->executeAction()
22:20:09 mw-error.log:#10 /workspace/src/includes/api/ApiMain.php(500): ApiMain->executeActionWithErrorHandling()
22:20:09 mw-error.log:#11 /workspace/src/api.php(90): ApiMain->execute()
22:20:09 mw-error.log:#12 /workspace/src/api.php(45): wfApiMain()
22:20:09 mw-error.log:#13 {main}

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This is interfering with LibraryUpgrader backporting security fixes to CI packages in older releases. We should try to backport whatever config change has resulted in this error not happening in other branches (the introduction of WikiConfigException, maybe?).

mewoph moved this task from Inbox to Needs Discussion on the Growth-Team board.
mewoph subscribed.

Moving to Needs Discussion for priorization

@DMburugu -- this is the sort of task for which I'm not able to understand the details and implications. Please prioritize or not prioritize this as you and the engineers see fit!

This error confuses me. It comes from HomepageHooks.php(423), but...that code patch is supposed to catch pretty much any error? https://github.com/wikimedia/mediawiki-extensions-GrowthExperiments/blob/REL1_35/includes/HomepageHooks.php#L427

Back in 1.35 the Mentor class also uses MWException rather than WIkiConfigException (https://github.com/wikimedia/mediawiki-extensions-GrowthExperiments/blob/REL1_35/includes/Mentor.php#L113), which is also interesting, but given both subclass Exception, it should still work in theory?

I'm also unable to reproduce the issue -- Mentor::newFromMentee() does throw exceptions as intended, but during account creation (API or normally) does not let them propagate, as expected.

Even if the exception is caught, the tests would fail if there's error-level log output I think.

MMiller_WMF lowered the priority of this task from High to Medium.Oct 11 2021, 2:28 AM

No comments on this in 6 months, is this still an issue? If so, we could re-prioritize, but otherwise removing from current sprint.