Page MenuHomePhabricator

Add API framework to CopyPatrol
Closed, ResolvedPublic5 Estimated Story Points

Description

We've decided to use the API where possible, so time we start using a framework instead of cURL. We'll also want to change all of our current API logic to use the framework.

Event Timeline

kaldari triaged this task as Medium priority.Jun 30 2016, 5:18 PM
kaldari updated the task description. (Show Details)
kaldari updated the task description. (Show Details)
DannyH set the point value for this task to 5.Jun 30 2016, 5:22 PM
DannyH moved this task from Needs Discussion to Up Next (June 3-21) on the Community-Tech board.

This should probably be done sooner than later as other tasks are dependent upon it.

Pull request at https://github.com/Niharika29/PlagiabotWeb/pull/16/files and currently running on http://tools.wmflabs.org/plagiabot (no visible changes)

Using the API over the labs database to get the edit counts is about 500ms slower it looks like, but it will ensure we always have production data. I'm proposing we go with this API solution until we are reassured the replication lag issue has been resolved. I have a few ideas to make it go even faster that I will explore at a later time.

Either way by introducing an API framework to CopyPatrol we will be able to fulfill T138058, T135301 and I hope to also (on my free time) add a revision delete button for admins, since we procedurally do this on enwiki.

Replication lag back to 200+ minutes, so I've merged the API branch and deployed it.

@kaldari fixed in a150dfb along with other minor cleanup if you want to take another look!

Niharika subscribed.

I logged in to Plagiabot instance and git log (on master) didn't show the API commit. The latest commit was:

commit c411bd74baefc51c9a65b46aaa258590c8c92178
Author: MusikAnimal <ziemba0123@gmail.com>
Date:   Tue Jul 5 10:49:42 2016 -0400

    Fix wrapping of text in compare pane

So I went ahead and did a git pull (to test the API changes along with mine for letting users not undo others' reviews). And now https://tools.wmflabs.org/plagiabot seems broken. :(

Sorry, wasn't removing nulls from the list of username given to the API. I've fixed and deployed this.

Sorry again! My mistake