Page MenuHomePhabricator

Add yue.wikt to Cognate
Closed, ResolvedPublic

Description

Add yue.wikt to Cognate.
Update the documentation of what to do when creating a new Wiktionary to include Cognate as well.

Event Timeline

Lea_Lacroix_WMDE triaged this task as Normal priority.Jan 22 2019, 3:22 PM
Lea_Lacroix_WMDE created this task.
Restricted Application added a project: User-Addshore. ยท View Herald TranscriptJan 22 2019, 3:23 PM

Update the documentation of what to do when creating a new Wiktionary to include Cognate as well.

The step is included in the addWiki script that should be run when creating a new wiki.

https://github.com/wikimedia/mediawiki-extensions-WikimediaMaintenance/blob/master/addWiki.php#L277-L285

Looking at T205546 i couldn't actually see if this had been done or if it failed etc?

I'll manually add it now

Mentioned in SAL (#wikimedia-operations) [2019-01-22T15:30:14Z] <addshore> addshore@mwmaint1002:~$ mwscript extensions/Cognate/maintenance/populateCognateSites.php --wiki yuewiktionary --site-group wiktionary // T214400

Mentioned in SAL (#wikimedia-operations) [2019-01-22T15:34:23Z] <addshore> addshore@mwmaint1002:~$ mwscript extensions/Cognate/maintenance/populateCognatePages.php --wiki yuewiktionary // T214400 (1 row)

This is now blocked onT214402 which will need to be fixed before I can finish the script run.

Until then Cognate on yuewiktionary will half work, but most pages on yuewiktionary will not appear on the side bar of other wiktionaries.

Mentioned in SAL (#wikimedia-operations) [2019-01-23T08:44:14Z] <addshore> addshore@mwmaint1002:~$ mwscript extensions/Cognate/maintenance/populateCognatePages.php --wiki yuewiktionary --batch-size 1000 // T214400

There are only 3000 or so pages that the script might needs to insert, so just running the script with a batchsize of 1000 and ignoring the issue described in T214402 so that we can get this task done.

The run completed, output can be seen at P8021

That's interesting. Let me take a look.

Restricted Application added a project: User-Ladsgroup. ยท View Herald TranscriptJan 29 2019, 10:30 AM

The sites table of cognate is fine:

wikiadmin@db1069.eqiad.wmnet(cognate_wiktionary)> select * from cognate_sites where cgsi_interwiki in ('yue', 'zh-yue', 'zh_yue') limit 5;
+----------------------+---------------+----------------+
| cgsi_key             | cgsi_dbname   | cgsi_interwiki |
+----------------------+---------------+----------------+
| -6200984024765764604 | yuewiktionary | yue            |
+----------------------+---------------+----------------+
1 row in set (0.00 sec)

The interwiki file (https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/interwiki.php) has the incorrect config but it's automatically generated by dumpInterwiki.php and changing dumpInterwiki.php very likely would cause Cantonese Wikipedia to break.

cgsi_interwiki should / could probably have a unique constraint on it.
Then we would have spotted this issue earlier.

PopulateCognateSites essentially makes the assumption that the interwiki prefix can always be the language code of the wiktionary
Which held true until this happened

PopulateCognateSites essentially makes the assumption that the interwiki prefix can always be the language code of the wiktionary
Which held true until this happened

Actually this assumption is still correct. Cantonese Wiktionary has language of 'yue', db name and global key of 'yuewiktionary' and its url is yue.wiktionary.org OTOH, Cantonese wikipedia has language of 'yue', global key and db name of 'zh_yuewiktionary' and it points out to 'zh-yue.wikipedia.org'. As far as the dumpInterwiki.php goes, 'yue' is just an alias of 'zh-yue' so it makes the interwiki link to zh-yue.wiktionary.org.

Change 487017 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/WikimediaMaintenance@master] Special case yuewiktionary

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

Ladsgroup moved this task from incoming to in progress on the Wikidata board.Jan 30 2019, 11:55 AM

Change 487017 merged by jenkins-bot:
[mediawiki/extensions/WikimediaMaintenance@master] Special case yuewiktionary

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

Change 488903 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[operations/mediawiki-config@master] Update interwiki cache to have yuewiktionary instead of zh-yue

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

Change 488903 merged by jenkins-bot:
[operations/mediawiki-config@master] Update interwiki cache to have yuewiktionary instead of zh-yue

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

Mentioned in SAL (#wikimedia-operations) [2019-02-07T12:26:24Z] <ladsgroup@deploy1001> Synchronized wmf-config/interwiki.php: SWAT: [[gerrit:488903|Update interwiki cache to have yuewiktionary instead of zh-yue (T214400)]] (duration: 03m 04s)