Page MenuHomePhabricator

Switch CopyPatrol to use PageAssessments for WikiProject data
Closed, ResolvedPublic2 Estimated Story Points

Description

The English Wikipedia interface for CopyPatrol should use the PageAssessments data for it's WikiProject labels. This data is stored in the page_assessments and page_assessments_projects tables in the enwiki database. It can also be accessed via the PageAssessments API. See https://www.mediawiki.org/wiki/Extension:PageAssessments for more info.

Event Timeline

kaldari set the point value for this task to 2.Oct 18 2016, 10:17 PM
kaldari moved this task from Needs Discussion to Up Next (May 20-June 3) on the Community-Tech board.

@jcrespo, @bd808: The two PageAssessments tables don't seem to exist on the Labs replica of the enwiki database (page_assessments and page_assessments_projects). Do either of you know how to get those tables replicated to Tool Labs? Neither of them have any private data.

@kaldari there is some magic script that needs to be updated and run to create the views for new tables I think. I don't really know much more about it that that. I poked around wikitech a bit and didn't find any obvious documentation on the process. Hopefully @jcrespo can point us in the right direction.

@bd808 @kaldari Managing the views on labs is something that the labs team has always managed and continues managing, as it has nothing to do with database administration. My responsability finishes the moment they are replicating to labs:

$ mysql -h labsdb1001 enwiki -e "SELECT * FROM page_assessments LIMIT 1\G"
*************************** 1. row ***************************
      pa_page_id: 12
   pa_project_id: 35
        pa_class: GA
   pa_importance: High
pa_page_revision: 749178811

I get pinged all the time about this, I do not know why, but I have nothing to do with labs managment (other than mantaining the database infrastructure up).

I talked to @chasemp on irc and found out that the procedure is mostly undocumented at this point. It involves a user with root on the labdb* hosts running the maintain-views script. Required info is the database(s) and the specific tables that need to be exposed.

This is ready to do now that the data is on Tool Labs.

Done with https://github.com/MusikAnimal/MusikBot/commit/d881ca6679e558f387929154345bdc24b6b2cef2 (enwiki only)

I've deployed this change, so will periodically check CopyPatrol to make sure WikiProjects are being populated.