Page MenuHomePhabricator

monitor mediawiki extensions superproject misconfiguration
Closed, DeclinedPublic

Description

The beta cluster rely on the super project mediawiki/extensions.git to deploy extensions automatically. Sometime an extension would be misconfigured, a recent example is VisualEditor which got stuck for a few weeks to an old version (bug 49846).

It would be nice to run a SQL query daily that would mail gerritadmin about any misconfiguration.


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz49906

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:44 AM
bzimport added a project: Gerrit.
bzimport set Reference to bz49906.
bzimport added a subscriber: Unknown Object (MLST).

Vector was not updated either, might have caused bug 49911

Campaigns not updating, bug 50261

So to find out what is not up to date:

Fetch the extensions:

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions.git
cd extensions
git submodule update --init

Then for each submodules look at the number of commits between HEAD (the currently checked out version locally) and origin/master (the version in gerrit):

git submodule foreach 'test "$(git rev-list HEAD..origin/master --count)" = "0" && echo "Up to date." || echo "ERROR!"'

Gives out something like:

...
Entering 'AuthorProtect'
Up to date.
Entering 'AutoCreateCategoryPages'
ERROR!

That extension is indeed lagging:

hashar:~/extensions/AutoCreateCategoryPages$ git log --oneline --decorate --all -n4
14a097d (origin/master, origin/HEAD, master) Localisation updates from http://translatewiki.net.
981a381 (HEAD) Localisation updates from http://translatewiki.net.
e01f64e Add .gitreview and .gitignore
7ae6dd3 (origin/REL1_21) Localisation updates from http://translatewiki.net.

A slightly better version being run on mediawiki/extensions.git at d0680b9

$ git submodule --quiet foreach 'test "$(git rev-list HEAD..origin/master --count)" = "0" || echo "ERROR! $path is lagging behind."'ERROR! AutoCreateCategoryPages is lagging behind.
ERROR! Bootstrap is lagging behind.
ERROR! Campaigns is lagging behind.
ERROR! CirrusSearch is lagging behind.
ERROR! CommunityTwitter is lagging behind.
ERROR! CoreEvents is lagging behind.
ERROR! EImage is lagging behind.
ERROR! JsonData is lagging behind.
ERROR! Less is lagging behind.
ERROR! OpenStreetMapSlippyMap is lagging behind.
ERROR! PerPageLicense is lagging behind.
ERROR! QuickResponse is lagging behind.
ERROR! TimelineTable is lagging behind.
ERROR! VisualEditor is lagging behind.
ERROR! WikibaseDataModel is lagging behind.
ERROR! WikibaseQueryEngine is lagging behind.
$

So now "all" that is needed is to have this in a cronjob that mails the output to...?

Greg: Was that a question to hashar?

(In reply to comment #7)

Greg: Was that a question to hashar?

Yeah, rhetorical mostly, but he's the one that can answer it ;)

(In reply to comment #6)

So now "all" that is needed is to have this in a cronjob that mails the
output to...?

I have no clue where it could be send. Nor do I have any idea where such a script should be run.

Possibly, we could run it once a few times per day as a Jenkins job and make that job alert back on IRC and/or to the Gerrit admin mail alias.

I have filled that bug to monitor mediawiki/extensions.git being badly configured (for bug 49846). Instead of using Gerrit maintained mediawiki/extensions.git, I will write a script that list all extensions, register them on beta and then do the submodule update.