Page MenuHomePhabricator

wgGEHomepageMentorsList is invalid
Open, LowestPublicPRODUCTION ERROR

Description

Error
normalized_message
No mentor available for {user}
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.21/extensions/GrowthExperiments/includes/Mentorship/MentorPageMentorManager.php(288)
#0 /srv/mediawiki/php-1.37.0-wmf.21/extensions/GrowthExperiments/includes/Mentorship/MentorPageMentorManager.php(214): GrowthExperiments\Mentorship\MentorPageMentorManager->getMentorsPage()
#1 /srv/mediawiki/php-1.37.0-wmf.21/extensions/GrowthExperiments/includes/Mentorship/MentorPageMentorManager.php(233): GrowthExperiments\Mentorship\MentorPageMentorManager->getAutoAssignedMentors()
#2 /srv/mediawiki/php-1.37.0-wmf.21/extensions/GrowthExperiments/includes/Mentorship/MentorPageMentorManager.php(137): GrowthExperiments\Mentorship\MentorPageMentorManager->getRandomAutoAssignedMentor(User)
#3 /srv/mediawiki/php-1.37.0-wmf.21/extensions/GrowthExperiments/includes/Mentorship/MentorPageMentorManager.php(146): GrowthExperiments\Mentorship\MentorPageMentorManager->getMentorForUser(User)
#4 /srv/mediawiki/php-1.37.0-wmf.21/extensions/GrowthExperiments/includes/HelpPanelHooks.php(150): GrowthExperiments\Mentorship\MentorPageMentorManager->getMentorForUserSafe(User)
#5 /srv/mediawiki/php-1.37.0-wmf.21/includes/HookContainer/HookContainer.php(338): GrowthExperiments\HelpPanelHooks::onBeforePageDisplay(OutputPage, SkinMinerva)
#6 /srv/mediawiki/php-1.37.0-wmf.21/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#7 /srv/mediawiki/php-1.37.0-wmf.21/includes/HookContainer/HookRunner.php(942): MediaWiki\HookContainer\HookContainer->run(string, array, array)
#8 /srv/mediawiki/php-1.37.0-wmf.21/includes/OutputPage.php(2639): MediaWiki\HookContainer\HookRunner->onBeforePageDisplay(OutputPage, SkinMinerva)
#9 /srv/mediawiki/php-1.37.0-wmf.21/includes/MediaWiki.php(939): OutputPage->output(boolean)
#10 /srv/mediawiki/php-1.37.0-wmf.21/includes/MediaWiki.php(952): MediaWiki::{closure}()
#11 /srv/mediawiki/php-1.37.0-wmf.21/includes/MediaWiki.php(559): MediaWiki->main()
#12 /srv/mediawiki/php-1.37.0-wmf.21/index.php(53): MediaWiki->run()
#13 /srv/mediawiki/php-1.37.0-wmf.21/index.php(46): wfIndexMain()
#14 /srv/mediawiki/w/index.php(3): require(string)
#15 {main}
Impact
  • 1,530 reports (the last timestamp Sep 4, 2021 @ 00:31:43.480)
  • INFO level
  • checked Special::EditGrowthConfig on jawiki and eswiki - the Mentorship is enabled, but the pages with the list of mentors are not given
  • the reports were not on the Growth dashboard

Details

Request URL
https://ja.wikipedia.org/wiki/%E3%82%B6%E3%83%BB%E3%83%AD%E3%83%B3%E3%82%B0%E3%83%BB%E3%82%A2%E3%83%B3%E3%83%89%E3%83%BB%E3%83%AF%E3%82%A4%E3%83%B3%E3%83%87%E3%82%A3%E3%83%B3%E3%82%B0%E3%83%BB%E3%83%AD%E3%83%BC%E3%83%89

Event Timeline

Restricted Application added subscribers: Masumrezarock100, Aklapper. · View Herald Transcript

@Urbanecm_WMF AFAIK this isn't a problem, but maybe there's something we should do about reducing the log levels?

@Urbanecm_WMF AFAIK this isn't a problem, but maybe there's something we should do about reducing the log levels?

It's not a user-facing problem, but it logs a lot of INFO-level messages now that most wikis we're deployed to do not have a mentor list. I think WikiConfigException should not be thrown at all if the page is simply missing from the config, as we accept that as a valid configuration. I'll upload a patch that makes a difference between a) mentor list is not configured b) mentor list is configured in an invalid way.

This should stop logging messages for wikis where the mentor list is missing, but keep them if a wiki manages to set an invalid value for the variable (which is probably important for us to know).

Once that patch gets deployed, we might even consider increasing the log level to WARNING (or even ERROR), so invalid list is caught during chores.

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

[mediawiki/extensions/GrowthExperiments@master] MentorManager: Throw WikiConfigException only if mentor list is invalid

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

This is not a production error; it is logged into a dedicated channel (GrowthExperiments) that does not appear in standard error dashboards.

Moving to sprint, as I uploaded a patch that needs CR.

Change 719061 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] MentorManager: Mentor list methods should not throw WikiConfigException for missing mentor list

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

Checked on wmf.23 - the info-level messages are still present (link for normalized_message:"No mentor available for {user}".
There are also a messages that include individual user names (the same link as for the normalized message).

@Urbanecm_WMF - there should be a follow-up patch as per commit message on https://gerrit.wikimedia.org/r/719061?

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

[mediawiki/extensions/GrowthExperiments@master] MentorManager::getRandomAutoAssignedMentor should not throw if no mentors are available

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

Change 721986 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] MentorManager::getRandomAutoAssignedMentor should not throw if no mentors are available

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