Page MenuHomePhabricator

Invalidate MentorStatusManager cache when a status is changed
Closed, ResolvedPublic

Description

MentorStatusManager has an in-process cache that needs to be invalidated after a new status is written via user options and/or community configuration. In rEGRE8bfc6b50e7e823396f42c304a3632065bc69af01 we introduced a new additional way of updating the status but we forgot to handle the cache invalidation. This task is to fix that

Acceptance criteria

  • MentorStatusManager remains updated when the away status is stored via community configuration

Event Timeline

Change #1198014 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] CommunityStructuredMentorWriter: invalidate status manager cache on writes

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

Sgs triaged this task as Medium priority.Nov 4 2025, 1:13 PM
Sgs moved this task from Incoming to Code Review on the Growth-Team (FY2025-26 Q2 Sprint 2) board.
Sgs renamed this task from Invalidate MentorStatusManager when a status is changed to Invalidate MentorStatusManager cache when a status is changed.Nov 4 2025, 1:31 PM

Change #1198014 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] CommunityStructuredMentorWriter: invalidate status manager cache on writes

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

I see the change has been merged. Probably, this can just be closed, right? Or should specify a BDD here so that it can go into QA?

I see the change has been merged. Probably, this can just be closed, right? Or should specify a BDD here so that it can go into QA?

What would BDD mean, please?

I see the change has been merged. Probably, this can just be closed, right? Or should specify a BDD here so that it can go into QA?

What would BDD mean, please?

Sorry, I should have not used shorthand. This was intended as a reference to Behavior-driven development and basically was asking: Should we describe how to reproduce the bug (or its fix) with a GIVEN ... WHEN ... THEN ... kind of structure so that it can be verified by QA? Or is that not possible or worth it and we should just close it? I'm leaning towards the latter, but I haven't looked deeper into this and so I'm not sure, hence asking.

I think you would be able to test this if you make a change via Special:ManageMentors (make someone away), and then check on Special:Homepage whether they are indeed marked as away.

Michael moved this task from Code Review to QA on the Growth-Team (FY2025-26 Q2 Sprint 3) board.

I think you would be able to test this if you make a change via Special:ManageMentors (make someone away), and then check on Special:Homepage whether they are indeed marked as away.

Thanks!

So this task can be verified by doing the following:

GIVEN an active Mentor and their Mentee
WHEN the Mentor is marked as away via Special:ManageMentors
THEN the mentee looking at the mentorship module on their Homepage is seeing them as marked away immediately

I don't have admin editing rights on enwiki beta so I can't change the away status of a mentor by editing the onwiki list. Is this something you can help with Martin?

Etonkovidova updated the task description. (Show Details)