Page MenuHomePhabricator

Revalidate Add Link suggestions on enwiki
Closed, ResolvedPublic2 Estimated Story Points

Description

To better understand the impact of T434259: Introduce case sensitivity to Add-a-Link, we will need to revalidate Add Link suggestions on enwiki.
This has also been requested by the community.


Acceptance Criteria:

Similar to T434319: Revalidate Add Link suggestions on enwiki, we should revalidate Add Link suggestions on enwiki via revalidateLinkRecommendations.php and monitor for errors.


Progress checking query

SET @run_start := UNIX_TIMESTAMP('2026-09-01 00:00:00');  -- when the script was started

SELECT
  COUNT(*) AS recommendations,
  SUM(is_fresh) AS regenerated,
  COUNT(*) - SUM(is_fresh) AS pending,
  ROUND(100 * SUM(is_fresh) / COUNT(*), 2) AS pct_regenerated
FROM (
  SELECT CAST(COALESCE(JSON_VALUE(gelr_data, '$.meta.task_timestamp'), 0) AS UNSIGNED) >= @run_start AS is_fresh
  FROM growthexperiments_link_recommendations
  WHERE gelr_data IS NOT NULL
) AS r;

Event Timeline

Question: What has changed since the last revalidation? Is it the model version (to include the case insensitivity work)? Or is it something else? This will be necessary to configure the revalidation script properly.

DMburugu set the point value for this task to 2.Sep 7 2026, 3:39 PM

Mentioned in SAL (#wikimedia-operations) [2026-09-08T14:13:28Z] <urbanecm@deploy1003> mwscript-k8s job started: GrowthExperiments:revalidateLinkRecommendations.php --wiki=enwiki --olderThan 1788220800 --verbose # T437158

Urbanecm_WMF triaged this task as Medium priority.
Urbanecm_WMF moved this task from Incoming to Doing on the Growth-Team (FY2026-27 Q1 Sprint 6) board.

New service was deployed on 2026-08-31 (https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/1332676), so let's revalidate anything older than 2026-09-01T00:00 UTC (1788220800 in unix epoch terms).

Progress checking query:

SET @run_start := UNIX_TIMESTAMP('2026-09-01 00:00:00');  -- when the script was started

SELECT
  COUNT(*) AS recommendations,
  SUM(is_fresh) AS regenerated,
  COUNT(*) - SUM(is_fresh) AS pending,
  ROUND(100 * SUM(is_fresh) / COUNT(*), 2) AS pct_regenerated
FROM (
  SELECT CAST(COALESCE(JSON_VALUE(gelr_data, '$.meta.task_timestamp'), 0) AS UNSIGNED) >= @run_start AS is_fresh
  FROM growthexperiments_link_recommendations
  WHERE gelr_data IS NOT NULL
) AS r;

Results:

+-----------------+-------------+---------+-----------------+
| recommendations | regenerated | pending | pct_regenerated |
+-----------------+-------------+---------+-----------------+
|          687292 |      170825 |  516467 |           24.85 |
+-----------------+-------------+---------+-----------------+
1 row in set (10.502 sec)

Compared to last round of revalidation, the task pool size shrinked significantly (chart source):

image.png (2,602×1,474 px, 187 KB)

Still running as intended. Progress report:

+-----------------+-------------+---------+-----------------+
| recommendations | regenerated | pending | pct_regenerated |
+-----------------+-------------+---------+-----------------+
|          681116 |      364446 |  316670 |           53.51 |
+-----------------+-------------+---------+-----------------+
1 row in set (11.401 sec)

mysql:research@dbstore1009.eqiad.wmnet [enwiki]>

Script is still running. Progress report:

+-----------------+-------------+---------+-----------------+
| recommendations | regenerated | pending | pct_regenerated |
+-----------------+-------------+---------+-----------------+
|          673199 |      487668 |  185531 |           72.44 |
+-----------------+-------------+---------+-----------------+
1 row in set (10.546 sec)

Script is still running. Progress report:

+-----------------+-------------+---------+-----------------+
| recommendations | regenerated | pending | pct_regenerated |
+-----------------+-------------+---------+-----------------+
|          668724 |      541579 |  127145 |           80.99 |
+-----------------+-------------+---------+-----------------+
1 row in set (10.369 sec)

The script is still running. Progress report:

+-----------------+-------------+---------+-----------------+
| recommendations | regenerated | pending | pct_regenerated |
+-----------------+-------------+---------+-----------------+
|          666088 |      597329 |   68759 |           89.68 |
+-----------------+-------------+---------+-----------------+
1 row in set (10.321 sec)

And we are done:

[urbanecm@deploy1003 ~]$ kubectl logs --tail=20 -f jobs/mw-script.eqiad.5rrhbbwd
Defaulted container "mediawiki-5rrhbbwd-app" out of: mediawiki-5rrhbbwd-app, mediawiki-5rrhbbwd-tls-proxy, mediawiki-5rrhbbwd-rsyslog
  George E. Duckworth is outdated, regenerating... success
  Richmond P. Davis is outdated, regenerating... success
  André Courville is outdated, regenerating... success
  Quillian Yancey is outdated, regenerating... success
  Iraq–Slovakia relations is outdated, regenerating... success
  Cacosternum thorini is outdated, regenerating... success
  Lampsilis floridensis is outdated, regenerating... success
  Juron is outdated, regenerating... success
  Konrad (surname) is outdated, regenerating... success
  Denard is outdated, regenerating... success
  Eckert (surname) is outdated, regenerating... success
  SE 109/3 is outdated, regenerating... success
  Lutra is outdated, regenerating... success
  K. Roald Bergethon is outdated, regenerating... success
  Nicholas Polajenko is outdated, regenerating... success
  Ieva Andrejevaitė is outdated, regenerating... success
  Palmer O. Narveson is outdated, regenerating... success
  Equiti Group is outdated, regenerating... success
  Nadyne Brewer is outdated, regenerating... success
Done; replaced 529156, discarded 28521, null recommendations deleted 0
[urbanecm@deploy1003 ~]$

Progress check:

+-----------------+-------------+---------+-----------------+
| recommendations | regenerated | pending | pct_regenerated |
+-----------------+-------------+---------+-----------------+             
|          665519 |      664960 |     559 |           99.92 |             
+-----------------+-------------+---------+-----------------+                                                                                        
1 row in set (10.329 sec)

The remaining rows belong to deleted pages (see T435730: Drop Add Link recommendation rows on page deletes). I spot checked, but I did not check all 559 articles.

Not sure if there is a great way to fully test this, but I have:

I think we can consider this task resolved.