Page MenuHomePhabricator

Automoderator should be able to use public or internal liftwing endpoints
Closed, ResolvedPublic2 Estimated Story Points

Description

As described in
https://wikitech.wikimedia.org/wiki/Machine_Learning/LiftWing/Usage

The public liftwing endpoint that we currently use should only be used by clients running outside of production. Since we are going to deploy this to production, AutoModerator should use the internal endpoints there and continue to use the external endpoint for local development and patchdemo. The public and private APIs for this model are exactly the same, they just use a slightly different prefix:

internal base url: https://inference.discovery.wmnet:30443/
external base url: https://api.wikimedia.org/service/lw/inference/

I suggest we use configuration that mirrors the ORES extension, eg:

"AutoModeratorLiftWingBaseUrl": {
        "description": "The base URL of the LiftWing service. We set it by default to use the API Gateway endpoint which is publicly accessible and is modified by mediawiki deployments that run within the production WMF cluster and have access to the internal endpoint.",
        "value": "https://api.wikimedia.org/service/lw/inference/"
},
"AutoModeratorLiftWingAddHostHeader": {
        "description": "Whether to add the Host header to the LiftWing request. This is required for Lift Wing requests made using the internal endpoint within the WMF infrastructure.",
        "value": false
},
"AutoModeratorLiftWingRevertRiskHostHeader": {
        "value": "revertrisk-language-agnostic.revertrisk.wikimedia.org",
        "description": "Hostname to use with header for requests to RevertRisk endpoint."
},

Event Timeline

jsn.sherman set the point value for this task to 2.Tue, Apr 30, 3:32 PM
jsn.sherman moved this task from To be estimated to Up next on the Moderator-Tools-Team board.

Change #1025865 had a related patch set uploaded (by Kgraessle; author: Kgraessle):

[mediawiki/extensions/AutoModerator@master] Automoderator should be able to use public or internal liftwing endpoints

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

Change #1025865 merged by jenkins-bot:

[mediawiki/extensions/AutoModerator@master] Automoderator should be able to use public or internal liftwing endpoints

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