Page MenuHomePhabricator

Remove ApiSetMentorWeight
Closed, ResolvedPublic


According to Codesearch, action=growthsetmentorweight is not used by GrowthExperiments code (or other MW code). Instead, action=options is used by the weight changing JS. With the switch to the structured mentor list (T264343), this API will no longer work (instead, action=growthmanagementorlist will have to be used). Since it appears to be unused, removing it looks like the best option.

Places to check before removing
  • Check callers of the API (can be done using event.mediawiki_api_request in Hadoop, or api.log at mwlog1002 (T314361#8123465)
  • Check user scripts (mwgrep at mwmaint1002) (T314361#8123465)
Acceptance criteria
  • The action=growthsetmentorweight API is no longer available

Event Timeline

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

API callers:

hive (event)> select count(*) from mediawiki_api_request where year=2022 and month in (8,7) and params['action']='growthsetmentorweight';
Total MapReduce CPU Time Spent: 7 days 15 hours 27 minutes 26 seconds 920 msec
Time taken: 587.094 seconds, Fetched: 1 row(s)
hive (event)>

Site/user scripts:

[urbanecm@mwmaint1002 ~]$ mwgrep growthsetmentorweight

(total: 0, shown: 0)
[urbanecm@mwmaint1002 ~]$ mwgrep --user growthsetmentorweight

(total: 0, shown: 0)
[urbanecm@mwmaint1002 ~]$

Appears to be unused. Let's remove it.

Urbanecm_WMF renamed this task from Consider removing ApiSetMentorWeight to Remove ApiSetMentorWeight.Aug 2 2022, 12:19 PM
Urbanecm_WMF claimed this task.
Urbanecm_WMF triaged this task as Medium priority.
Urbanecm_WMF updated the task description. (Show Details)

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

[mediawiki/extensions/GrowthExperiments@master] Remove ApiSetMentorWeight

Change 819569 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Remove ApiSetMentorWeight

Tgr moved this task from Code Review to QA on the Growth-Team (Current Sprint) board.