Page MenuHomePhabricator

'scap update-interwiki-cache' does not exist on deployment-tin
Closed, InvalidPublic

Description

It would be good to have this enabled in order to ease the update of the Beta Labs interwiki map instead of mwscript extensions/WikimediaMaintenance/dumpInterwiki.php --protocolrelative > wmf-config/interwiki-labs.php directly writting to the server files without prior code review. Is this possible to have there? Thank you.

Event Timeline

Krenair subscribed.

It lives at deployment-tin:/srv/mediawiki-staging/scap/plugins/updateinterwikicache.py so I think you just need to cd into /srv/mediawiki-staging first:

krenair@deployment-tin:/srv/mediawiki-staging$ scap update-interwiki-cache
           ___ ____
         ⎛   ⎛ ,----
          \  //==--'
     _//|,.·//==--'    ____________________________
    _OO≣=-  ︶ ᴹw ⎞_§ ______  ___\ ___\ ,\__ \/ __ \
   ()_, )  (     |  ______/__  \/ /__ / /_/ / /_/ /
     ¨--¨|| |- (  / ______\____/ \___/ \__^_/  .__/
         ««_/  «_/ jgs/bd808                /_/

Username for 'https://gerrit.wikimedia.org':

It's probably worth noting that it only handles interwiki.php, not interwiki-labs.php though. And would still need someone to merge the patch to operations/mediawiki-config.

Apparently it can only be used with people with +2 on operations/mediawiki-config.git as it seems scap does generate the content, upload the patch and CR+2 it inmediatelly as well.

maurelio@deployment-tin:/srv/mediawiki-staging$ scap update-interwiki-cache
           ___ ____
         ⎛   ⎛ ,----
          \  //==--'
     _//|,.·//==--'    ____________________________
    _OO≣=-  ︶ ᴹw ⎞_§ ______  ___\ ___\ ,\__ \/ __ \
   (∞)_, )  (     |  ______/__  \/ /__ / /_/ / /_/ /
     ¨--¨|| |- (  / ______\____/ \___/ \__^_/  .__/
         ««_/  «_/ jgs/bd808                /_/

Username for 'https://gerrit.wikimedia.org':
Password for 'https://maurelio@gerrit.wikimedia.org':
remote: Unauthorized
fatal: Authentication failed for 'https://gerrit.wikimedia.org/r/p/operations/mediawiki-config.git/'
18:50:30 Unhandled error:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/scap/cli.py", line 336, in run
    exit_status = app.main(app.extra_arguments)
  File "/srv/mediawiki-staging/scap/plugins/updateinterwikicache.py", line 19, in main
    return super(UpdateInterwikiCache, self).main(*extra_args)
  File "/usr/lib/python2.7/dist-packages/scap/main.py", line 686, in main
    return super(SyncFile, self).main(*extra_args)
  File "/usr/lib/python2.7/dist-packages/scap/main.py", line 68, in main
    self._before_cluster_sync()
  File "/srv/mediawiki-staging/scap/plugins/updateinterwikicache.py", line 41, in _before_cluster_sync
    'HEAD:refs/for/master%l=Code-Review+2'])
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['/usr/bin/git', 'push', '-q', 'origin', 'HEAD:refs/for/master%l=Code-Review+2']' returned non-zero exit status 128
18:50:30 update-interwiki-cache failed: <CalledProcessError> Command '['/usr/bin/git', 'push', '-q', 'origin', 'HEAD:refs/for/master%l=Code-Review+2']' returned non-zero exit status 128

Yeah. Even if you can +2 in operations/mediawiki-config, you'd need prod deployment access to sync the repo in prod, and if that doesn't get done your patch will probably be reverted everywhere the next time someone comes along deploy a config change in prod.

No real way around this unless we make the labs interwiki cache an untracked file that we have generated automatically somehow (maybe puppet generating it and triggering a sync-file on change, but that's complicated).

Vvjjkkii renamed this task from 'scap update-interwiki-cache' does not exist on deployment-tin to h2aaaaaaaa.Jul 1 2018, 1:04 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: Aklapper, MarcoAurelio.
CommunityTechBot renamed this task from h2aaaaaaaa to 'scap update-interwiki-cache' does not exist on deployment-tin.Jul 2 2018, 1:46 PM
CommunityTechBot closed this task as Invalid.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)