Deprecate CheckModelVersions and integrate it with the extension workflow
Closed, ResolvedPublic

Description

It's not sustainable to have this as a maintenance script when it's needed all the time.

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptDec 21 2017, 2:15 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
awight added a subscriber: awight.Dec 21 2017, 3:46 PM

The best I can imagine so far is a two-prong strategy:

  • When a changes feed is displayed for a wiki which a) has models configured in $wg vars, but b) no models are available, we do a synchronous CheckModelVersions. (Async would be acceptable as well, but slightly harder on us to debug.)
  • Every time scores are retrieved, we compare with the (cached) database model versions. If the retrieved score models have incremented or are not included in the database models, we stuff the new model data into the db without an explicit CheckModelVersions.

We would need to log and cache exceptional conditions, e.g. one of these checks was triggered but the pulled data showed that the local configuration is in error, and the model is not actually available.

Change 400183 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/ORES@master] Update model version when it's different in ScoreParser

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

Change 400183 merged by jenkins-bot:
[mediawiki/extensions/ORES@master] Update model version when it's different in Scoring

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

Change 401592 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/ORES@master] Remove maintenance/CheckModelVersions.php

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

Change 401595 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/vagrant@master] Remove CheckModelVersions.php from ores role

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

Change 401592 merged by jenkins-bot:
[mediawiki/extensions/ORES@master] Remove maintenance/CheckModelVersions.php

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

Change 401595 merged by jenkins-bot:
[mediawiki/vagrant@master] Remove CheckModelVersions.php from ores role

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

Change 401775 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/vagrant@master] Remove dangling reference to ORES checkModelVersions

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

Change 401775 merged by jenkins-bot:
[mediawiki/vagrant@master] Remove dangling reference to ORES checkModelVersions

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

Change 401782 had a related patch set uploaded (by Awight; owner: Amir Sarabadani):
[mediawiki/vagrant@stretch-migration] Remove CheckModelVersions.php from ores role

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

Change 401783 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/vagrant@stretch-migration] Remove dangling reference to ORES checkModelVersions

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

awight added a comment.Jan 3 2018, 8:35 PM

@Ladsgroup I found an edge case that we need to catch (and have test coverage for): when there's no model row in the database, checkModelVersion crashes with an InvalidArgumentException.
I think the right behavior is to create a new row when getModelVersion can't find the model.

Yes, I'm already on it :)

Change 401782 abandoned by Awight:
Remove CheckModelVersions.php from ores role

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

Change 401783 abandoned by Awight:
Remove dangling reference to ORES checkModelVersions

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

Halfak closed this task as Resolved.Jan 30 2018, 8:31 PM