Page MenuHomePhabricator

Several wikis have 0 articles for all ORES topics
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  1. Go to https://ro.wikipedia.org/w/index.php?title=Special:Pagina_acas%C4%83
  2. Click the "Select interests"
  3. Pick any topic
  4. Wait until the suggested edits module refresh

What happens?:

No suggestions found dialog appears:

image.png (863×1 px, 99 KB)

An error is logged in console:

load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector:2 TypeError: Cannot read property 'token' of undefined
    at NewcomerTaskLogger.log (<anonymous>:315:502)
    at SuggestedEditsModule.logCardData (<anonymous>:273:262)
    at SuggestedEditsModule.showCard (<anonymous>:274:46)
    at initSuggestedTasks (<anonymous>:277:948)
    at <anonymous>:278:824
    at homepage/suggestededits/ext.growthExperiments.Homepage.SuggestedEdits.js (<anonymous>:279:54)
    at runScript (load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector:12)
    at Array.<anonymous> (load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector:13)
    at flushCssBuffer (load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector:4)
logError @ load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector:2
3load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=luflg:52 jQuery.Deferred exception: Cannot read property 'token' of undefined TypeError: Cannot read property 'token' of undefined
    at NewcomerTaskLogger.log (<anonymous>:315:502)
    at SuggestedEditsModule.logCardData (<anonymous>:273:262)
    at SuggestedEditsModule.showCard (<anonymous>:274:46)
    at SuggestedEditsModule.<anonymous> (<anonymous>:268:874)
    at mightThrow (https://ro.wikipedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=luflg:49:833)
    at process (https://ro.wikipedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=luflg:50:498) undefined
jQuery.Deferred.exceptionHook @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=luflg:52

What should have happened instead?:

Suggested edits functions normally (just as with no topics selected).

Notes

So far, I was unable to reproduce this at any other Growth wiki. https://ro.wikipedia.org/wiki/Special:NewcomerTasksInfo reports the following:

image.png (876×832 px, 67 KB)

All topics have exactly zero articles in all task types.

Originally reported at T284481#7177222.

Event Timeline

kostajh subscribed.

The JS error when there are no more tasks was fixed in a patch merged yesterday, but it has not been backported. Tagging Search team in case they have ideas why the topic search is not working here.

Urbanecm_WMF renamed this task from ro.wikipedia has 0 articles for all ORES topics to Several wikis have 0 articles for all ORES topics.Jun 25 2021, 7:13 PM

Not ro.wikipedia specific. fr.wikipedia is also affected, see https://fr.wikipedia.org/wiki/Sp%C3%A9cial:NewcomerTasksInfo. Going to query for more affected wikis via eventlogging data.

Not ro.wikipedia specific. fr.wikipedia is also affected, see https://fr.wikipedia.org/wiki/Sp%C3%A9cial:NewcomerTasksInfo. Going to query for more affected wikis via eventlogging data.

I ran the following spark query to get an idea how widespread this might be (it turns out it is very widespread).

WITH seImpressions AS (
    SELECT
        dt,
        wiki,
        str_to_map(event.action_data, ";", "=") AS action_data
    FROM event.homepagemodule
    WHERE
        year=2021
        AND month=6
        AND day=25
        AND event.action='impression'
        AND event.module='suggested-edits'
),

taskCountData AS (
    SELECT
        wiki,
        action_data['topics'] AS topics,
        action_data['taskCount'] AS task_count_num,
        CASE
            WHEN action_data['taskCount'] == 0 THEN '0'
            ELSE '>1'
        END AS task_count_human
    FROM seImpressions
    WHERE
        action_data['topics'] != ''
)

SELECT
    wiki,
    task_count_human,
    COUNT(*)
FROM taskCountData
GROUP BY wiki, task_count_human
ORDER BY wiki, task_count_human

and got the following results:

wikitask_count_humancount(1)
arwiki>1148
bgwiki08
bnwiki>126
cawiki011
cswiki>152
dawiki05
dawiki>13
elwiki014
enwiki>134
eswiki>1171
euwiki01
fawiki0135
fawiki>175
frwiki0102
frwiki>137
hewiki036
hewiki>116
hiwiki016
hrwiki03
huwiki012
huwiki>116
hywiki015
hywiki>134
idwiki039
idwiki>117
jawiki051
jawiki>147
kowiki01
kowiki>176
nowiki>11
plwiki026
plwiki>147
ptwiki>180
rowiki028
rowiki>15
ruwiki099
ruwiki>1105
simplewiki>11
srwiki02
srwiki>111
svwiki03
tawiki05
tewiki010
thwiki04
thwiki>137
trwiki057
trwiki>142
ukwiki015
ukwiki>14
viwiki>164

This table has a number of users using suggested edits today (on 2021-06-25) with topic filters enabled for each wiki, split by task_count_human (task_count_human is 0 if suggested edits module was empty with no tasks, and >1 otherwise).

I then checked few wikis where zero results was more frequent than non-zero result numbers, and it turns out a lot of wikis are affected, see below:

Basically topic-based filtering is broken at almost all of our wikis (interestingly, all the pilot wikis still sound to work).

I just tested things out on frwiki, plwiki, and fawiki, and here's what I see from the desktop user's perspective. This is on fawiki:

  1. When I go to wiki where i already have topics selected, I see this:

image.png (1×1 px, 107 KB)

  1. When I open the topics dialog and unselect all topics, it goes largely back to normal, but it says “1 of undefined suggestions”:

image.png (1×1 px, 124 KB)

  1. Then when I select a topic again, the dialog tells me “0 articles found”:

image.png (1×1 px, 155 KB)

  1. And after returning to the feed, the feed hasn’t visually changed, except that I can't navigate to the second suggestion (i.e. the right arrow does nothing):

image.png (1×1 px, 123 KB)

This problem does not affect all wikis. After checking 28 wikis that have Growth features, here is what I see:

WikiStatus
arOkay
koOkay
csOkay
viOkay
bnOkay
frBroken
esOkay
enOkay
faBroken
ptOkay
ruBroken
trBroken
plBroken
heBroken
svBroken
ukBroken
huBroken
hyBroken
srBroken
euBroken
lvBroken
jaBroken
simpleOkay
elBroken
caBroken
hiBroken
noBroken
bgBroken

Change 701609 had a related patch set uploaded (by Ebernhardson; author: Ebernhardson):

[mediawiki/extensions/CirrusSearch@master] Revert "Add support for ores drafttopic" and "Stop querying ores_articletopics"

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

Mentioned in SAL (#wikimedia-operations) [2021-06-25T20:21:12Z] <urbanecm@deploy1002> Synchronized php-1.37.0-wmf.11/extensions/GrowthExperiments/modules/homepage/suggestededits/ext.growthExperiments.Homepage.SuggestedEdits.js: rEGREeaec745e4504: SuggestedEdits: Only log task impression for EditCardWidget (T283546; emergency deployment) (duration: 01m 00s)

Cross-linking a deployment attributed to some other task, but actually done due to this one (to make it less broken).

Under the hood this is using articletopic: biology or similar in search which is returning zero results. The most likely cause is our removal of some BC code that was querying the previous field name. Above patch reverts that removal and should bring the wikis back to acceptable functionality for the time being. Critically this old field that it will be referencing is no longer being updated, so this cannot be a long term solution.

The underlying problem appears to be the new weighted_tags field is missing in the mapping for rowiki (and maybe others). The process we use for reindexing, via foreachwikiindblist, is known to be error prone. The wikis that failed reindexing will need to be identified and resolved before re-deploying the patch.

Change 701425 had a related patch set uploaded (by Ebernhardson; author: Ebernhardson):

[mediawiki/extensions/CirrusSearch@wmf/1.37.0-wmf.11] Revert "Add support for ores drafttopic" and "Stop querying ores_articletopics"

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

Change 701609 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] Revert "Add support for ores drafttopic" and "Stop querying ores_articletopics"

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

Change 701425 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@wmf/1.37.0-wmf.11] Revert "Add support for ores drafttopic" and "Stop querying ores_articletopics"

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

@EBernhardson -- thank you for fixing this. Do you know approximately what the time period was when users experienced this? We want to note it for our analytics.

@Mmiller0712 it would have rolled out with the train, so starting around june 24, 19:00 UTC.

Etonkovidova claimed this task.

Checked the wikis with GrowthExperiments (listed in https://phabricator.wikimedia.org/T285577#7178267)

✅ Special:NewcomerTasksInfo

WikiStatus before the fixChecked after the fix - wmf.12
arOkay
koOkay
csOkay
viOkay
bnOkay
frBroken
esOkayexpand number of task 0
enOkay
faBroken
ptOkay
ruBroken
trBroken
plBroken
heBrokenlinks number of tasks 2
svBrokenlinks number of tasks 2
ukBroken
huBroken
hyBrokencopyedit number of tasks 0
srBroken
euBroken
lvBroken
jaBroken
simpleOkay
elBroken
caBroken
hiBroken
noBroken
bgBrokenlinks number of tasks 3