Page MenuHomePhabricator

Termbox SSR should only be called with valid term languages
Open, Needs TriagePublic

Description

Termbox seems to be called occasionally with languages that do not exist and are sometimes not even valid. This seems to cause two different errors in our logs:

Error 1:
Asked for data in a language that itself is not existing.

The incidence of this error is rather low with 30 events in the last 7 days and 111 events in the last 6 weeks.

image.png (1,332×269 px, 27 KB)

The language code most requested is by far und. Sometimes there are others like qzz, zzz, qqx, tokipona, fractrice, frauteur.

See Kubernetes (i.e. Termbox SSR) logstash. They produce a corresponding error on the MediaWiki side (logstash).

The code that throws this error was created in context of T228888. This error is probably what T231007: Handle unsupported languages more gracefully is about.

Error 2:
Request errors
With the following error object in the logs:

{
  "path": "language",
  "message": "should match pattern \"^[a-z]{2}[a-z0-9-]*$\"",
  "location": "query",
  "errorCode": "pattern.openapi.validation"
}

The language codes causing this error are 3-digit numbers like 906, 750, 918, 178, 238, 350, 458. There doesn't seem to be any pattern or clusters in those numbers.

But these errors are much rarer with only 7 events in the last 7 days and 35 events in the last 6 weeks.

See Kubernetes (i.e. Termbox SSR) logstash. They produce a corresponding error on the MediaWiki side (logstash) as well.

Note that this is different from T230786: Handle language codes containing numbers.

acceptance criteria

  • Termbox SSR is no longer called with an invalid language

Event Timeline

In my understanding this is indeed describing the same problem as T231007, just with different ways of discovering the issue and ideas for a solution.
The main challenge, in my eyes, is not so much technical in nature but how to create a pleasant user experience around handling requested invalid languages. As such it makes sense to join forces between the tickets and try for some answers by product.