Background & Problem
As part of T407818: Add a Link: Rollout "Add a Link" Structured Task to Chinese, Japanese, & Urdu Wikipedias, I started the preparation works for Add Link deployment to three new wikis. I attempted to follow https://wikitech.wikimedia.org/wiki/Add_Link#Enabling_on_a_new_wiki, and I noticed that docs page is: describing a fairly complicated (and manual) process, as well as being heavily out of date (there is not a single line in that section that is 100% accurate at this point).
Currently, the documentation page ignores the introduction of those key components:
- MediaWiki-extensions-CommunityConfiguration the extension (extensions/GrowthExperiments/maintenance/changeWikiConfig.php no longer exists)
- CommunityConfiguration:ChangeWikiConfig.php uses a different syntax for changing the wiki-page (the three arguments at the end are PROVIDER, KEY and VALUE; --json no longer exists)
- link-recommendation task type is configured under link_recommendation (which the docs page does not reflect)
- mwscript is no longer used to execute maint. scripts; instead, we use mwscript-k8s
Converting the excluded section population from Add Link took a good while, running into mwscript-k8s confusion (T410451) and missing all the changes in syntax that happened in the meantime. A working version of the command line is at T407818#11385945.
In addition to the documentation being out of date, it is not a sustainable way to deploy new features. We should not require ourselves to run a bunch of manual steps that are fragile, as illustrated above.
Options
There are three approaches we could take here:
- Create a scraffolding script like initAddLinkConfig which would do the manual steps for it
- Stop pre-populating excluded sections configuration on per-wiki basis (this would also solve T345562 by declining it)
- Merely update the documentation page to reflect the changes that happened in the meantime
If we want to keep the current behaviour, option 1 is (by far) the most preferred. However, it would require a bit of work, as we need to figure out how to access wiki_sections.jsonl in a programatic way (downloading F35092312 from a maintenance script doesn't seem to be a good idea). If we're comfortable with leaving excluded sections to the wikis, then option 2 would make a lot of sense to me.
At a minimum, we should update the documentation page to be truthful. However, this alone is not solving the unnecessary complexity bits the deployment process currently has.
Task Scope
Within this task, we should:
- decide on what route we want to take,
- fill relevant subtasks