Page MenuHomePhabricator

wgGEHomepageMentorsList is invalid
Closed, ResolvedPublicPRODUCTION 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

Related Objects

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

This still needs some treatment (see Logstash), but i'm not actively working on this those days.

This still needs some treatment (see Logstash), but i'm not actively working on this those days.

Checked the link "Mentorship: No mentor available" message in Logstash - a high number of hits just for the one day (363,115).

This still needs some treatment (see Logstash), but i'm not actively working on this those days.

Checked the link "Mentorship: No mentor available" message in Logstash - a high number of hits just for the one day (363,115).

Thanks for checking that @Etonkovidova. Putting this in the current sprint for us to do something about reducing the volume of Logspam.

kostajh raised the priority of this task from Lowest to Medium.Apr 6 2022, 1:41 PM
kostajh edited projects, added GrowthExperiments-Mentorship; removed GrowthExperiments.

@Urbanecm_WMF I think we should do something about this Logspam; is that something you could work on in the context of the GrowthExperiments-Mentorship work?

@Urbanecm_WMF I think we should do something about this Logspam; is that something you could work on in the context of the GrowthExperiments-Mentorship work?

Sure thing. I'll have a look at it. Thanks for the ping!

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

[mediawiki/extensions/GrowthExperiments@master] MentorManager::getMentorForUserSafe: Do not log instances of WikiConfigException

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

Change 778610 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] MentorManager::getMentorForUserSafe: Do not log instances of WikiConfigException

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

Checked in betalabs logs - the error's last timestamp is Apr 17, 2022 @ 14:42:36.361 which is a good indication that the fix is working. Moving to Test in Production.