Page MenuHomePhabricator

Mentor dashboard: Mentee overview should not include users with homepage and/or mentorship disabled
Closed, ResolvedPublic

Description

Currently, the mentor dashboard includes everyone who has a mentor assigned. Since we assign a mentor to all newcomers (for #mentor to be usable for all new accounts, mainly), this means all new accounts display in the mentee overview, even though they're not mentees in the primary sense.

We should remove users with either homepage disabled or mentorship disabled (currently, enwiki-only) from the dashboard.

Event Timeline

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

[mediawiki/extensions/GrowthExperiments@master] Mentee overview: Exclude users without homepage enabled

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

Change 734730 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Mentee overview: Exclude users without homepage enabled

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.38.0-wmf.5] Mentee overview: Exclude users without homepage enabled

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.38.0-wmf.6] Mentee overview: Exclude users without homepage enabled

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

Change 734752 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.38.0-wmf.6] Mentee overview: Exclude users without homepage enabled

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

Change 734751 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.38.0-wmf.5] Mentee overview: Exclude users without homepage enabled

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

Mentioned in SAL (#wikimedia-operations) [2021-10-27T10:11:58Z] <urbanecm@deploy1002> Synchronized php-1.38.0-wmf.6/extensions/GrowthExperiments/: rEGRE305e97a7d1b3, rEGREb9eaa208aa59: GrowthExperiments backports (T293434, T294386) (duration: 01m 04s)

[urbanecm@mwmaint1002 /srv/mediawiki/php]$ mwscript extensions/GrowthExperiments/maintenance/updateMenteeData.php --wiki=cswiki --dbshard=s2 --verbose
Profiling data:
  * filtermentees: 2.24 seconds
  * edittimestampinternal: 0.14 seconds
  * usernames: 0.05 seconds
  * reverted: 3.04 seconds
  * questions: 2.45 seconds
  * editcount: 0.05 seconds
  * registration: 0.06 seconds
  * blocks: 1.82 seconds
===============
Done. Took 28 seconds.
[urbanecm@stat1005 ~/tmp/test-no-homepage-cswiki]$ echo 'select * from growthexperiments_mentee_data' | analytics-mysql cswiki --use-x1 > growthexperiments_mentee_data_before.txt
[urbanecm@mwdebug1001 /srv/mediawiki/php]$ scap pull
10:01:56 Copying from deploy1002.eqiad.wmnet to mwdebug1001.eqiad.wmnet
10:01:56 Started rsync common
10:02:01 Finished rsync common (duration: 00m 05s)
10:02:01 Started scap-cdb-rebuild
10:02:02 Finished scap-cdb-rebuild (duration: 00m 00s)
10:02:02 Checking if php-fpm restart needed
[urbanecm@mwdebug1001 /srv/mediawiki/php]$ mwscript extensions/GrowthExperiments/maintenance/updateMenteeData.php --wiki=cswiki --dbshard=s2 --verbose
Profiling data:
  * filtermentees: 3.58 seconds
  * edittimestampinternal: 0.2 seconds
  * usernames: 0.05 seconds
  * reverted: 1.94 seconds
  * questions: 1.42 seconds
  * editcount: 0.04 seconds
  * registration: 0.04 seconds
  * blocks: 2.1 seconds
===============
Done. Took 27 seconds.
[urbanecm@stat1005 ~/tmp/test-no-homepage-cswiki]$ echo 'select * from growthexperiments_mentee_data' | analytics-mysql cswiki --use-x1 > growthexperiments_mentee_data_after.txt
[urbanecm@stat1005 ~/tmp/test-no-homepage-cswiki]$ cut -f 1 growthexperiments_mentee_data_before.txt > before_ids.txt
[urbanecm@stat1005 ~/tmp/test-no-homepage-cswiki]$ cut -f 1 growthexperiments_mentee_data_after.txt > after_ids.txt
[urbanecm@stat1005 ~/tmp/test-no-homepage-cswiki]$ wc -l after_ids.txt before_ids.txt
 2527 after_ids.txt
 3105 before_ids.txt
 5632 total
[urbanecm@stat1005 ~/tmp/test-no-homepage-cswiki]$ # 3105*0.8=2484; 2527 rows after the change matches expectations
[urbanecm@stat1005 ~/tmp/test-no-homepage-cswiki]$ grep -vf after_ids.txt before_ids.txt | sort -rn | sed '1,30d' | head
<redacted>
[urbanecm@stat1005 ~/tmp/test-no-homepage-cswiki]$ analytics-mysql cswiki
mysql:research@dbstore1007.eqiad.wmnet [cswiki]> select * from user_properties where up_user in (<ids listed above>) and up_property like 'growthexp%';
Empty set (0.004 sec)

Works as expected. Closing.