Page MenuHomePhabricator

scap update-interwiki-cache is broken
Open, Needs TriagePublic

Description

Running scap update-interwiki-cache in mwdeploy2002 changes the interwiki file but doesn't make the patch nor deploys it. IIRC it used to do that.

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
update-interwiki-cache: Give some output on successrepos/releng/scap!507legoktmlegoktm-master-patch-84874master
Customize query in GitLab

Event Timeline

This behavior was removed from scap update-interwiki-cache in T247107.

Thanks for the pointer but this is adding a lot of toil to an already miserable process of creating new wikis. See one, two and three (specially T158730#5527658). We don't need to revert to the previous way though. We can add it the file to gitignore, show diff and then sync the file. If history of that file is important, we can add a local git submodule, commit it and then after showing diff, sync it. Or any other idea that removes toil from this process.

cc @Krinkle @Zabe @Urbanecm and @thcipriani

@Ladsgroup How hard would it be to run the script to create the updated interwiki map locally instead of in prod? If feasible, it could be automated as part of the creationg one of the wmf-config commits that you need regardless as part of wiki creation.

Then it becomes a normal scap deploy after that.

It relies on realms to build a different interwiki file depending on whether it's production or beta: https://gerrit.wikimedia.org/g/mediawiki/extensions/WikimediaMaintenance/+/c8675aff88719eedb14e9f87ca2ceef31ee72287/dumpInterwiki.php#87

Otherwise, it looks doable judging by the code

Change 975356 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/extensions/WikimediaMaintenance@master] dumpInterwiki: Add --target-realm and --mwconfig-dir to ease local usage

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

Change 975356 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMaintenance@master] dumpInterwiki: Add --target-realm and --mwconfig-dir to ease local usage

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

The general lack of output on the command isn't helpful either:

reedy@deploy1002:/srv/mediawiki-staging$ scap update-interwiki-cache
reedy@deploy1002:/srv/mediawiki-staging$ scap update-interwiki-cache
reedy@deploy1002:/srv/mediawiki-staging$ git diff
diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index 025b93410..1be37135e 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
 <?php
-// Automatically generated by dumpInterwiki.php on Sat, 11 May 2024 19:07:17 +0000
+// Automatically generated by dumpInterwiki.php on Thu, 23 May 2024 13:22:24 +0000
 return [
        '__global:acronym' => '0 https://www.acronymfinder.com/$1.html',
        '__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
reedy@deploy1002:/srv/mediawiki-staging$

The general lack of output on the command isn't helpful either:

Got burned by this today so I sent an MR to output some info.

legoktm opened https://gitlab.wikimedia.org/repos/releng/scap/-/merge_requests/507

update-interwiki-cache: Give some output on success

Deployed in scap 4.118.0.