Page MenuHomePhabricator

Ensure MentorWeightManager is not used with structured mentor list
Closed, ResolvedPublic

Description

Background

MentorWeightManager relies on the growthexperiments-mentorship-weight user property only. User properties are the only place to store information about mentors with the wikitext list, however, when we switch to the structured list, we are able to store them on-wiki in a JSON blob. For that reason, when structured mentor list is enabled, MentorWeightManager doesn't need to be called at all.

Checklist
  • T314361: Remove ApiSetMentorWeight
  • Ensure only WikitextMentorProvider uses MentorWeightManager
  • Throw when MentorWeightManager is used with incorrect provider (fatal error is easier to catch than a logic error when incorrect weights are used)
QA notes
  • Ensure that mentor weight is correctly read (in the Mentor dashboard, and ideally when mentees sign up) and written
  • After wmf.25 is deployed, logstash should not have a fatal saying MentorWeightManager cannot be used when GEMentorProvider is not "wikitext".

Event Timeline

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

[mediawiki/extensions/GrowthExperiments@master] MentorTools: Do not use MentorWeightMentorManager

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

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

[mediawiki/extensions/GrowthExperiments@master] MentorWeightManager: Throw when constructed with wrong provider

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

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

[mediawiki/extensions/GrowthExperiments@master] Move WEIGHT_* constants to IMentorWeights

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

Change 819635 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Move WEIGHT_* constants to IMentorWeights

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

Change 819517 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] MentorTools: Do not use MentorWeightManager

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.39.0-wmf.23] Move WEIGHT_* constants to IMentorWeights

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.39.0-wmf.23] MentorTools: Do not use MentorWeightManager

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

Change 820870 abandoned by Urbanecm:

[mediawiki/extensions/GrowthExperiments@wmf/1.39.0-wmf.23] Move WEIGHT_* constants to IMentorWeights

Reason:

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

Change 820871 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.39.0-wmf.23] MentorTools: Do not use MentorWeightManager

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

Mentioned in SAL (#wikimedia-operations) [2022-08-08T12:06:13Z] <urbanecm@deploy1002> Synchronized php-1.39.0-wmf.23/extensions/GrowthExperiments/: 3eaf155678b7313c55dcca0cd39ab29f73eead37: MentorTools: Do not use MentorWeightManager (T314362) (duration: 03m 31s)

Urbanecm_WMF changed the task status from Open to In Progress.Aug 11 2022, 11:08 AM

Change 819573 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] MentorWeightManager: Throw when constructed with wrong provider

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

Urbanecm_WMF changed the task status from In Progress to Open.Aug 16 2022, 6:05 AM