Extension:ORES/Debugging

We can control which backend will be used with the extension by setting/changing the value of the configuration variable "wgOresUseLiftwing". If this value is set to true Lift Wing is used, while when it is false ORES is used.

We can use the following steps to verify that a deployment that enables Lift Wing is functioning properly.

Let's say we want to deploy this change to enwiki.

We submit a change in the mediawiki-config repo for the configuration file wmf-config/ext-ORES.php where we enable it like this:

'wgOresUseLiftwing' => [
	'default' => false,
	'enwiki' => true
],

After this change is deployed (either via a train or a backport window deployment we do the following:

  • All deployments are first deployed in mwdebug so we can first test it over there before it reaches production by running the following commands
    # connect to mwdebug
    ssh mwdebug1002.eqiad.wmnet
    # run mwscript for the wiki we want to test
    mwscript eval.php --wiki=enwiki -d 3
    # first we validate that the value of the variable $wgOresUseLiftwing is true which means that we are using Lift Wing
    var_dump($wgOresUseLiftwing);
    # We create and run a FetchScoreJob and verify that we have no errors
    # We can get one of the latest revisions to verify it from https://en.wikipedia.org/wiki/Special:RecentChanges
    # and we can get the revision id of the article by looking at the oldid in the url when clicking on the diff
    $job = new ORES\Services\FetchScoreJob( Title::newFromText( 'Southampton F.C.' ), [ 'revid' => 1167111665, 'precache' => false ] );
    $job->run();
    
  • We check the logstash dashboard named mediawiki-NEW-errors by filtering with the "ores" keyword.
  • We monitor the RecentChanges page and verify that we have scores for new revisions by selecting some of the ORES filters from the drop down list. If an article does not appear with any of the filters on a model it means that there was an error trying to fetch scores from Lift Wing and something is off.
  • We run some queries against the mediawiki database to verify that the extension tables are populated with new scores. An easy way to do this is visit quarry.wmflabs.org and run the following query making sure we select the database for the wiki we are testing.
    SELECT * FROM ores_classification
    ORDER BY oresc_rev DESC
    LIMIT 10;
    
    The above query will show us the latest revisions that have been scored in descending order. We can cross check the revision ids with the most recent ones from the RecentChanges page.