Page MenuHomePhabricator

Incorrect paging in GrowthExperiments suggested edits module
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

Steps to reproduce:

  • go to your homepage (tested on huwiki)
  • observe you get a large number of suggested edits
  • start clicking through the results with the "next" arrow
  • observe that after a while the total task count changes to something like your current position plus ten or fifteen (and you will get the no more results page when you get there).

It happens randomly, but very frequently. Feels like a JS race condition in handling the growthtasks API call. The number where it happens is different on every try.


Re-checked on wmf.8 (as part of reviewing open issues for Create Task T379124: Suggested Edits: Newcomer Tasks count QA)
Summary:
(1) the issue is easily reproducible on frwiki and eswiki ( on dewiki the issue is not that easy to reproduce) with the following steps

  • on Special:Homepage do not select any topics
  • select Add link (a structured task) task type
  • click on the arrow button (doesn't matter how fast or slow is clicked; if you want to go fast, mouse-focus on the arrow and click the space bar to go fast)
  • past 15th task, the initial counter number will change a different number, usually to less than 30

(2) huwiki wmf.8 - the issue is still not reproducible for me; doesn't matter how fast the arrow button is clicked

(3) Selecting different task types or selecting all topics/some of the topics do not trigger the issue. It seems that the issue is isolated to the selection of Add link structured task.

Event Timeline

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

The issue looks similar to what was reported in T317575, T308887, T279024, T242814, and T312686. I checked couple of scenarios on huwiki, but I could not reproduce the issue.

It is almost deterministically reproducible for me. You just need to click very quickly. (Not sure if that's the only way to trigger it, but it's a reliable way.)

It is almost deterministically reproducible for me. You just need to click very quickly. (Not sure if that's the only way to trigger it, but it's a reliable way.)

Having a Selenium test for this could be useful.

KStoller-WMF moved this task from Triaged to Blocked on the Growth-Team board.
KStoller-WMF subscribed.

I believe this is blocked, correct?

Sgs set the point value for this task to 1.Jan 7 2025, 4:22 PM
Sgs raised the priority of this task from Low to High.

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

[mediawiki/extensions/GrowthExperiments@master] [WIP] SuggestedEdits: improvements in tasks pagination lookahead

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

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

[mediawiki/extensions/GrowthExperiments@master] debug(LinkRecommendationStore): log recommendations not found by revid

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

Change #1111308 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] debug(LinkRecommendationStore): log recommendations not found by revid

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

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

[operations/mediawiki-config@master] beta: increase growth tasks lookahead size

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

The debug logger has been active in production for the last days and no logs are shown which points again to the protection filter as the most probable responsible of this. I need to invest some more time to ensure that's the case, if so, the most promising solution is T259346: Add page protection filter to CirrusSearch.

I've also pushed a change to increase the lookahead size we use as default from 5 to 10 in enwiki beta so we can test if that reduces the occurrence rate of the issue.

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

[mediawiki/extensions/GrowthExperiments@master] GrowthTasksApi: make lookahead size configurable

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

Change #1113997 merged by jenkins-bot:

[operations/mediawiki-config@master] beta: increase growth tasks lookahead size

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

Urbanecm_WMF subscribed.

@Sgs Moving back to Doing, as both patches are merged, and it looks like you plan on observing something in beta now. Feel free to move elsewhere if you think that's more appropriate.

Change #951899 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] GrowthTasksApi: make lookahead size configurable

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

After merging 1118541: beta: fix typo in GEApiQueryGrowthTasksLookaheadSize variable the lookahead increase seems to have improved status quo in beta enwiki and the issue is less frequent. The issue will happen mostly in the last - 1 page of results due to page protection filtering (almost no logs are found when debugging the link recommendation filter). Our best bet for definitely fixing the issue would be to work on T259346.

I can increase the lookahead size for all beta and prod wikis once @Etonkovidova confirms the improvement in beta enwiki vs the rest of beta wikis.

Sgs lowered the priority of this task from High to Medium.Feb 12 2025, 4:55 PM

After merging 1118541: beta: fix typo in GEApiQueryGrowthTasksLookaheadSize variable the lookahead increase seems to have improved status quo in beta enwiki and the issue is less frequent. The issue will happen mostly in the last - 1 page of results due to page protection filtering (almost no logs are found when debugging the link recommendation filter). Our best bet for definitely fixing the issue would be to work on T259346.

I can increase the lookahead size for all beta and prod wikis once @Etonkovidova confirms the improvement in beta enwiki vs the rest of beta wikis.

I checked on enwiki beta - the issue is not present anymore. There is a momentary pause when 15th article is reached (and that pause gets repeated for every next 15 article), i.e. the arrow is greyed out and navigating to the next article is not available, but it's a really minor pause. Thx, @Sgs for looking into the issue!

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

[operations/mediawiki-config@master] [Growth] Set default api lookahead size to 10

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

Change #1120180 merged by jenkins-bot:

[operations/mediawiki-config@master] [Growth] Set default api lookahead size to 10

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

Mentioned in SAL (#wikimedia-operations) [2025-03-06T14:56:06Z] <hashar@deploy2002> Started scap sync-world: Backport for [[gerrit:1120180|[Growth] Set default api lookahead size to 10 (T325990)]], [[gerrit:1124879|Revert "Let sysops add/remove the event-organizer group by default" (T386738)]], [[gerrit:1122990|Remove unused route file from Wikibase REST API configuration (T383774)]]

Mentioned in SAL (#wikimedia-operations) [2025-03-06T14:58:49Z] <hashar@deploy2002> hashar, sgimeno, itamar, daimona: Backport for [[gerrit:1120180|[Growth] Set default api lookahead size to 10 (T325990)]], [[gerrit:1124879|Revert "Let sysops add/remove the event-organizer group by default" (T386738)]], [[gerrit:1122990|Remove unused route file from Wikibase REST API configuration (T383774)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2025-03-06T15:20:34Z] <hashar@deploy2002> Started scap sync-world: Backport for [[gerrit:1120180|[Growth] Set default api lookahead size to 10 (T325990)]], [[gerrit:1124879|Revert "Let sysops add/remove the event-organizer group by default" (T386738)]], [[gerrit:1122990|Remove unused route file from Wikibase REST API configuration (T383774)]]

Mentioned in SAL (#wikimedia-operations) [2025-03-06T15:24:26Z] <hashar@deploy2002> itamar, sgimeno, daimona, hashar: Backport for [[gerrit:1120180|[Growth] Set default api lookahead size to 10 (T325990)]], [[gerrit:1124879|Revert "Let sysops add/remove the event-organizer group by default" (T386738)]], [[gerrit:1122990|Remove unused route file from Wikibase REST API configuration (T383774)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2025-03-06T15:30:58Z] <hashar@deploy2002> Finished scap sync-world: Backport for [[gerrit:1120180|[Growth] Set default api lookahead size to 10 (T325990)]], [[gerrit:1124879|Revert "Let sysops add/remove the event-organizer group by default" (T386738)]], [[gerrit:1122990|Remove unused route file from Wikibase REST API configuration (T383774)]] (duration: 10m 23s)