Page MenuHomePhabricator

Integrate liftwing revertrisk:language-agnostic in our article
Closed, ResolvedPublic8 Estimated Story Points

Description

With ORES deprecation scheduled for early September, we need to integrate liftwing in our article.
{timebox 1 sprint}

To do

  • Update schema and json-schema - We will use similar schema as that for goodfaith/damaging with prediction and probabilities.
  • Add revertrisk API to wmf client : use OAuth token with wme tier (Refer to this ticket)
  • Call revertrisk API in structured-data handlers wherever we are calling other scores. Call it using context deadline of 500 ms. Make sure not to return an error when revertrisk API call fails. Simply, log the error appropriately.
  • Update docs
  • Go to infrastructure/services repo > Settings > CI/CD. Add wmf_oauth_token in CI/CD variables > TFVAR (dv and pr). For now, add the values of token that you have currently that was used for testing. (We will swap this with the 2 tokens that we are about to request)
  • In infrastructure/services/variables.tf, add the following variable:
variable "wmf_oauth_token" {
   type        = string
   description = "OAuth token used to access WMF services"
   default     = ""
   sensitive   = true
}
  • In infrastructure/services/00_services.tf, for structured-data-articleupdate, structured-data-articledelete, structured-data-articlebulk and structured-data-articlevisibility, add the following config:
secrets = {
        WMF_OAUTH_TOKEN = var.wmf_oauth_token
}
  • In structured-data service, add an env variable in env.go : WMF_OAUTH_TOKEN `

Acceptance criteria
Able to see revertrisk scores in structured-data.articles topic

Scope: structured data

Event Timeline

prabhat triaged this task as High priority.Aug 2 2023, 1:03 PM

hi @LDlulisa-WMF! Do you know when
resp.version.scores.damaging||goodfaith will not show up in v2/articles and v2/structured-contents and the new version.scores.revert-risk object will? @creynolds has been asking. Thanks!

Thanks @JArguello-WMF. @creynolds it's still in MR, but will be in QA next week in dev. In terms of pushing to production it will be later next week or the week after.

Done, extra tickets to fix some bugs will be created

JArguello-WMF changed the point value for this task from 5 to 8.Sep 21 2023, 1:11 PM
JArguello-WMF moved this task from QA to Done on the Wikimedia Enterprise (Sprint 46) board.