Page MenuHomePhabricator

Fix Regular Expression in API GW config for revert risk
Closed, ResolvedPublic

Description

This Regex:

https://gerrit.wikimedia.org/r/plugins/gitiles/operations/deployment-charts/+/refs/heads/master/helmfile.d/services/api-gateway/values.yaml#188

does not match RR models which have a dash in the second part. I.e. it matches revertrisk-multilingual, but not revertrisk-language-agnostic.

The proper RE would be using ([\w-]+), or in full: 'lw/inference/v1/models/revertrisk-([\w-]+):predict' to allow for arbitrary numbers of word-like (\w) and - characters.

See also: https://regex101.com/r/hjd93J/1

Event Timeline

Change 922805 had a related patch set uploaded (by Klausman; author: Tobias Klausmann):

[operations/deployment-charts@master] API GW: Fix RegEx in config for revertrisk models on Lift Wing

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

Change 922805 merged by Klausman:

[operations/deployment-charts@master] helmfile.d: Fix regex in api-gateway's config for revertrisk

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

Changes have been merged and deployed, Bot eqiad and codfw (and staging) sections of the API GW work fine (tested from within clusters), as well as remote (from my home machine).