Page MenuHomePhabricator

Create MentorData{Uncached}Provider to provide data about mentor's mentees
Open, MediumPublic

Description

Background

The Growth team is going to work on mentor dashboard (see T278920: Mentor dashboard: V1 desktop). As part of this dashboard, we will need to have a way to provide required data about mentor's mentee, so we can feed the dashboard with data.

Task objective

Create a maintenance script that will:

  1. Determine mentees that will be covered in the mentor overview. That means (copied from T278971):
    1. All mentees mentored by a given mentor, minus:
    2. Bot accounts
    3. Indefinitely blocked accounts
    4. Mentees who registered at least 2 weeks ago, and have 0 edits
    5. Mentees who did not make any edit in the last 6 months
  2. Delete rows from growthexperiments_mentee_data for all users that will not be covered by the mentor overview module
  3. For each covered mentee, calculate:
    1. Number of reverted edits
    2. Number of blocks the mentee received
    3. Number of mentorship questions the mentee asked
    4. Number of total edits made by the mentee (user_editcount)
    5. Registration timestamp (user_registration)
  4. Insert all data to growthexperiments_mentee_data encoded in a JSON blob

Example blob:

{
    "reverted": 123,
    "blocks": 0,
    "questions": 4,
    "editcount": 1000,
    "user_registration": "20200413130400"
}

The data stored in the database table will be calculated via MentorDataUncachedProvider (which will talk to the real databases) and accessed via MentorDataProvider, that will talk only to the caching table.

Event Timeline

kostajh triaged this task as Medium priority.Apr 14 2021, 8:19 PM

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

[mediawiki/extensions/GrowthExperiments@master] MentorStore: Add a way to get mentees mentored by a given mentor

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

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

[mediawiki/extensions/GrowthExperiments@master] WIP: Introduce UncachedMenteeDataProvider

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

Change 682024 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] MentorStore: Add a way to get mentees mentored by a given mentor

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

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

[mediawiki/extensions/GrowthExperiments@master] WIP: Add MentorDashboardDataProvider to be used by mentee overview

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

Change 682025 abandoned by Urbanecm:

[mediawiki/extensions/GrowthExperiments@master] WIP: Introduce UncachedMenteeDataProvider

Reason:

squashed to Idb1013303f4d045ee311a428cdbf040325fc2259

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

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

[mediawiki/extensions/GrowthExperiments@master] MentorStore::getMenteesByMentor: Make it work for mentors without mentees

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

Change 685509 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] MentorStore::getMenteesByMentor: Make it work for mentors without mentees

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

This comment was removed by Iniquity.