Page MenuHomePhabricator

ruwiki: Too many AddLink suggestions were generated before 'excludedSections' rule was introduced
Closed, ResolvedPublicBUG REPORT

Description

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Iniquity renamed this task from AddLink feature ignore 'no put link in this section' rule to AddLink feature ignore 'excludedSections' rule.Aug 14 2023, 6:06 PM

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

[mediawiki/extensions/GrowthExperiments@master] revalidateLinkRecommendations: Make it possible to revalidate tasks older than

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

Hi @Iniquity,

Thanks for reporting (and for trying to enable Add a link). I've reviewed the two examples you've provided and it seems both are for articles that were left unedited for quite a while (2018 and 2019 in particular). Unfortunately, the excludedSections setting is applied when the task pool is generated, rather than than when users searches for available tasks (this is because the suggestions are generated when the task pool is populated, and not afterwards, as generation is a time-consuming process that we cannot do on-demand). The suggestion is revalidated whenever someone edits the article, but in this case, the article was left unedited for years, and it is possible the suggestion was never revalidated for that reason.

Those issues unfortunately cause (significant) delays between when new sections are added to excludedSections and when the change actually takes effect. excludedSections was added to the config file on May 7, 2022, so if the recommendation for those two articles was generated anytime between the last article edit and May 7, 2022, it wouldn't take excludedSections into effect for that reason.

I went ahead and did an analysis on ruwiki to see how many suggestions might be outdated:

mysql:research@dbstore1005.eqiad.wmnet [ruwiki]> select count(*) from growthexperiments_link_recommendations;
+----------+
| count(*) |
+----------+
|    15061 |
+----------+
1 row in set (0.009 sec)

mysql:research@dbstore1005.eqiad.wmnet [ruwiki]> select count(*) from growthexperiments_link_recommendations where json_extract(gelr_data, '$.meta.task_timestamp') is null or json_extract(gelr_data, '$.meta.task_timestamp') < 1651960800;
+----------+
| count(*) |
+----------+
|     2117 |
+----------+
1 row in set (0.337 sec)

mysql:research@dbstore1005.eqiad.wmnet [ruwiki]>

So it seems about 14.06% of the task pool is older than May 7, 2022 -- I'm not sure what to compare this number with, but it seems to be fairly high. Unfortunately, this doesn't have an easy community-available solution. I uploaded a patch that'll allow me/Growth engineers to revalidate recommendations that are older than a given date, which will allow us to revalidate all recommendations generated before the configuration change happened, which should resolve this issue.

Moving to Code Review -- noting the script needs to be executed on ruwiki for this task to be actually considered resolved.

Urbanecm_WMF triaged this task as Medium priority.

Removing Regression, as this actually behaves as expected (the issue is the suggestions are old, generated before the config change has happened, and we didn't get to setting up anything that'd do the invalidations automatically).

Please move to In Progress once the patch gets merged, for me to run the script.

Urbanecm_WMF renamed this task from AddLink feature ignore 'excludedSections' rule to ruwiki: Too many AddLink suggestions were generated before 'excludedSections' rule was introduced.Aug 15 2023, 3:49 PM

Change 948668 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] revalidateLinkRecommendations: Make it possible to revalidate tasks older than

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.41.0-wmf.22] revalidateLinkRecommendations: Make it possible to revalidate tasks older than

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.41.0-wmf.20] revalidateLinkRecommendations: Make it possible to revalidate tasks older than

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

Change 949180 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.41.0-wmf.22] revalidateLinkRecommendations: Make it possible to revalidate tasks older than

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

Change 949181 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.41.0-wmf.20] revalidateLinkRecommendations: Make it possible to revalidate tasks older than

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

Mentioned in SAL (#wikimedia-operations) [2023-08-16T12:18:09Z] <urbanecm@deploy1002> Started scap: Backport for [[gerrit:949180|revalidateLinkRecommendations: Make it possible to revalidate tasks older than (T344034)]], [[gerrit:949181|revalidateLinkRecommendations: Make it possible to revalidate tasks older than (T344034)]]

Mentioned in SAL (#wikimedia-operations) [2023-08-16T12:26:30Z] <urbanecm@deploy1002> Finished scap: Backport for [[gerrit:949180|revalidateLinkRecommendations: Make it possible to revalidate tasks older than (T344034)]], [[gerrit:949181|revalidateLinkRecommendations: Make it possible to revalidate tasks older than (T344034)]] (duration: 08m 20s)

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

[mediawiki/extensions/GrowthExperiments@master] LinkRecommendationUpdater: Load link-recommendation even if disabled

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

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

[operations/mediawiki-config@master] Growth: Temporarily disable link-recommendation frontend

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

Change 949510 merged by jenkins-bot:

[operations/mediawiki-config@master] Growth: Temporarily disable link-recommendation frontend

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

Mentioned in SAL (#wikimedia-operations) [2023-08-16T12:46:30Z] <urbanecm@deploy1002> Started scap: Backport for [[gerrit:949510|Growth: Temporarily disable link-recommendation frontend (T344034)]]

Mentioned in SAL (#wikimedia-operations) [2023-08-16T12:54:34Z] <urbanecm@deploy1002> Finished scap: Backport for [[gerrit:949510|Growth: Temporarily disable link-recommendation frontend (T344034)]] (duration: 08m 04s)

Mentioned in SAL (#wikimedia-operations) [2023-08-16T12:58:02Z] <urbanecm> mwscript extensions/GrowthExperiments/maintenance/revalidateLinkRecommendations.php --wiki=ruwiki --olderThan=1651960800 --verbose # T344034

@Iniquity: FYI, I've started the revalidation of the task pool on ruwiki. It will revalidate all link recommendations that were generated before the list of sections was added to configuration. I'll let you know once that is done, so you can check how the link recommendation tasks look.

I had to temporarily switch the task type to "Enabled" in Community configuration, but I set it as disabled in the site configuration, so it is not served to newcomers. This is because the script refuses to work otherwise. I'll change it back once the revalidation is completed.

@Iniquity The script has finished, all link recommendations should now be generated with excluded sections in mind.

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

[operations/mediawiki-config@master] Revert "Growth: Temporarily disable link-recommendation frontend"

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

Change 949184 merged by jenkins-bot:

[operations/mediawiki-config@master] Revert "Growth: Temporarily disable link-recommendation frontend"

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

Mentioned in SAL (#wikimedia-operations) [2023-08-16T14:10:40Z] <urbanecm@deploy1002> Started scap: Backport for [[gerrit:949184|Revert "Growth: Temporarily disable link-recommendation frontend" (T344034)]]

Mentioned in SAL (#wikimedia-operations) [2023-08-16T14:12:27Z] <urbanecm@deploy1002> urbanecm: Backport for [[gerrit:949184|Revert "Growth: Temporarily disable link-recommendation frontend" (T344034)]] synced to the testservers mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug2001.codfw.wmnet, mwdebug1002.eqiad.wmnet, and mw-debug kubernetes deployment (accessible via k8s-experimental XWD option)

Mentioned in SAL (#wikimedia-operations) [2023-08-16T14:19:47Z] <urbanecm@deploy1002> Finished scap: Backport for [[gerrit:949184|Revert "Growth: Temporarily disable link-recommendation frontend" (T344034)]] (duration: 09m 06s)

I've re-enabled Add a link in site configuration and disabled it again in Community configuration.

@Iniquity I think this should be now ready for tests, as both this task and T344163 are resolved now.

I've re-enabled Add a link in site configuration and disabled it again in Community configuration.

@Iniquity I think this should be now ready for tests, as both this task and T344163 are resolved now.

Many thanks for the prompt fix! I'll test the functionality over the weekend or early next week :)

Etonkovidova subscribed.

I've re-enabled Add a link in site configuration and disabled it again in Community configuration.

@Iniquity I think this should be now ready for tests, as both this task and T344163 are resolved now.

Many thanks for the prompt fix! I'll test the functionality over the weekend or early next week :)

@Iniquity - did you have a chance to check? I checked the two examples in the task description (via api calls) - add link recommendations seem to take into account the existing exclusion on MediaWiki:NewcomerTasks.json.