Page MenuHomePhabricator

Watchlist Expiry: investigate star bug for action=watch page (beta) [8Hours]
Closed, ResolvedPublic

Description

As a PM, I want to know the reason why the star is not automatically updating upon watch on action=watch page (beta), so we can determine if this is a Watchlist Expiry bug.

Background: In the process of testing T248495, we found an issue (i.e., star status not changing until after page reload). This may be a beta environment issue, since the issue could not be replicated on local environments. It may also be a Watchlist Expiry issue. The purpose of this ticket is to investigate the issue & recommend next steps.

Acceptance Criteria:

  • Investigate why the relevant star shading is only displayed upon reload in beta on action=watch page
  • Propose and share solution to the problem
  • If a simple fix, implement fix to problem (otherwise, it can be handled in a separate ticket)

Visual Examples:

Example #1: I have watched a page temporarily (after not watching page at all), but the star is still not shaded

Screen Shot 2020-06-11 at 6.24.11 PM.png (313×1 px, 56 KB)

Example #2: I switched from watching temporarily to permanently, but I still see the half star

Screen Shot 2020-06-11 at 6.23.29 PM.png (361×1 px, 65 KB)

Event Timeline

ifried renamed this task from Watchlist Expiry: investigate star bug on beta [placeholder] to Watchlist Expiry: investigate star bug for action=watch page (beta).May 29 2020, 12:08 AM
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)
ifried added subscribers: Mooeypoo, ARamirez_WMF.
ARamirez_WMF renamed this task from Watchlist Expiry: investigate star bug for action=watch page (beta) to Watchlist Expiry: investigate star bug for action=watch page (beta) [8Hours].Jun 11 2020, 11:45 PM
ARamirez_WMF moved this task from Needs Discussion to Up Next (June 3-21) on the Community-Tech board.

This is a long-standing issue, see T28292. It was partially fixed by Krinkle with https://gerrit.wikimedia.org/r/319255. Indeed it is broken again if the watchlist expiry feature flag is set :( I can't figure out why, though. A possible fix is to use the expiry when generating the cache key, but we can't do this because we don't know what the expiry is when we want to fetch the cached object. I've asked for help at T28292#6265657.

I have also started to see this problem on https://test.wikipedia.org (MediaWiki 1.36.0-wmf.1 (rMW652572fd47fb) 18:24, 22 July 2020).

I have also started to see this problem on https://test.wikipedia.org (MediaWiki 1.36.0-wmf.1 (rMW652572fd47fb) 18:24, 22 July 2020).

Yup, that's to be expected. Thanks for mentioning it

T256654 weclomes rechecking once this has been resolved.

Change 616647 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/core@master] Watchlist: Fix action=watch caching the wrong expiry

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

Change 616647 merged by jenkins-bot:
[mediawiki/core@master] Watchlist: Fix action=watch caching the wrong expiry

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

Change 616972 had a related patch set uploaded (by Samwilson; owner: Dmaza):
[mediawiki/core@REL1_35] Watchlist: Fix action=watch caching the wrong expiry

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

Change 616972 merged by jenkins-bot:
[mediawiki/core@REL1_35] Watchlist: Fix action=watch caching the wrong expiry

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

T256654 weclomes rechecking once this has been resolved.

I can still reproduce this issue on https://en.wikipedia.beta.wmflabs.org MediaWiki 1.36.0-alpha (72ac5e1) 06:44, 31 July 2020.

T256654 weclomes rechecking once this has been resolved.

I can still reproduce this issue on https://en.wikipedia.beta.wmflabs.org MediaWiki 1.36.0-alpha (72ac5e1) 06:44, 31 July 2020.

This is a separate issue tho. The patch for this tasks solves it when watching/unwatching via action=watch

The bug no longer happens on beta when submitting action=watch.

Doing the transition from:

  • Unwatched to temp watched
  • Unwatched to perm watched
  • Perm watched to temp watched
  • Perm watched to perm watched
  • Temp watched to temp watched
  • Temp watched to perm watched

It has the correct watch star image and expiry in the tooltip (if applicable) on the submit page.

Because this code is used in a few places, I retested Special:EditWatchlist/raw could add a new watched page.

As mentioned in T253937#6351073, I don't think this fixes the issue while editing.

Also, I don't think beta has a replica database like production has. Reading the commit message, this might have an impact on the behaviour. Might be worth retesting once this goes to production (e.g. on testwiki). I've added a TODO item for myself.

Test environment: https://en.wikipedia.beta.wmflabs.org MediaWiki 1.36.0-alpha (58b7003) 13:38, 31 July 2020

I can still reproduce this issue on https://en.wikipedia.beta.wmflabs.org MediaWiki 1.36.0-alpha (72ac5e1) 06:44, 31 July 2020.

This is a separate issue tho. The patch for this tasks solves it when watching/unwatching via action=watch

No problem. I was just commenting as an FYI.

@dmaza Hey, there! I wanted to check about one thing: We have talked about how the fix for action=watch (i.e., this ticket) and source editing (T259564) would need to be separate. However, when I tested this on testwiki today, I saw that *both* the action=watch bug and the source editing bug for the star seemed to be fixed. However, on beta, it appears that only the action=watch bug is fixed. Is this because of the most recent changes being deployed to beta, but not testwiki yet? Just wanted to ping you and make sure I understand the current status correctly. Thanks!

@dmaza Hey, there! I wanted to check about one thing: We have talked about how the fix for action=watch (i.e., this ticket) and source editing (T259564) would need to be separate. However, when I tested this on testwiki today, I saw that *both* the action=watch bug and the source editing bug for the star seemed to be fixed. However, on beta, it appears that only the action=watch bug is fixed. Is this because of the most recent changes being deployed to beta, but not testwiki yet? Just wanted to ping you and make sure I understand the current status correctly. Thanks!

Are you talking about T256654: pages watched using the watchthis control in the wikitext editor do not show as watched after publishing until the page is reloaded? is T259564: Watchlist Expiry: update watch status when editing via dropdown [[LARGE]] the same? in any case, the fix for this task is not fixing either. I'm currently looking at T256654

ifried closed this task as Resolved.EditedAug 5 2020, 9:10 PM

The question I originally asked has been resolved in a conversation with @dmaza. We discussed the fact that the action=watch bug and the source editing bug will be resolved in separate tickets. Furthermore, while there may be some questions if the source editing bug is indeed fixed, or if the bug can reproduced in local environments, they will be addressed in a separate ticket. We'll look into T256654 and T259564 & see if/how they are related, as well.

Meanwhile, the actual focus of this ticket (i.e., the bug of the star not automatically updating upon temporary watch via action=watch) has been resolved. I have tested on testwiki, and the issue is no longer reproducible. For this reason, I'm marking this ticket as Done.