Page MenuHomePhabricator

Handle failure to load languages from cx server
Closed, ResolvedPublic2 Estimated Story Points

Description

Problem

On startup, the CX3 app is loading the list of supported languages from CX Server. Sometimes it fails and it leaves the app in a mostly broken state.

However, the popular "New translation" button that leads to the search feature remain available but the search feature itself is broken and triggers invalid instrumentation events as documented in T400463 and seen here.

Solution

Provide the list of languages to the app from SpecialContentTranslation.php. Take the list from cxserver/config/languages.yaml


Derived Requirement

Ensure that the CX3 app can properly handle scenarios where fetching the list of supported languages from CX Server fails. When this failure occurs, the app should instead load the list of languages from a fallback source provided by SpecialContentTranslation.php, which retrieves the list from cxserver/config/languages.yaml.

This prevents the app from entering a broken state and ensures that the “New translation” button and the search feature remain fully functional, avoiding invalid instrumentation events.

Test Artifact(s):

Test Steps

Test Case 1: Verify successful loading of languages from CX Server

  1. Launch the CX3 app.
  2. Observe the app initialization process.
  3. ✅❓❌⬜ AC1: Confirm that the list of supported languages is loaded successfully from CX Server when the server response is valid.
  4. ✅❓❌⬜ AC2: Confirm that the “New translation” button and search feature function normally.

QA Results - TestWiki

ACStatusDetails
1T405000#11325525
2T405000#11325525

Event Timeline

SBisson triaged this task as Medium priority.Oct 14 2025, 2:36 PM
SBisson updated the task description. (Show Details)
SBisson moved this task from Incoming to Prioritized on the LPL Hypothesis board.
eamedina changed the task status from Open to In Progress.Oct 14 2025, 7:58 PM
eamedina claimed this task.
eamedina moved this task from Prioritized to In-progress on the LPL Hypothesis board.

Change #1196524 had a related patch set uploaded (by Eamedina; author: Eamedina):

[mediawiki/extensions/ContentTranslation@master] CX: load supported languages directly from within ContentTranslation

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

Change #1196524 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: load supported languages directly from within ContentTranslation

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

Change #1197335 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 1.0.0+20251020

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

Change #1197335 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 1.0.0+20251020

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

ngkountas set the point value for this task to 2.Oct 23 2025, 8:31 AM

@eamedina Confirmed handle failure to load languages from cx server as seen in the video and logstash screenshot. I will move this to Sign-off. Thanks for all your work!

Test Result - Test Wiki

Status: ✅ PASS
Environment: Test Wiki
OS: macOS Tahoe 26.1
Browser: Chrome 141
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Verify successful loading of languages from CX Server

  1. Launch the CX3 app.
  2. Observe the app initialization process.
  3. AC1: Confirm that the list of supported languages is loaded successfully from CX Server when the server response is valid.
CxLogstash
2025-10-29_15-04-32.png (1×1 px, 840 KB)
  1. AC2: Confirm that the “New translation” button and search feature function normally.

See AC1

GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF moved this task from Needs QA to Design Signoff on the LPL Hypothesis board.
Nikerabbit subscribed.

This change adds technical debt (duplication of configuration from cxserver that impacts new wiki creation process) that has not been adequately resolved.

Change #1201739 had a related patch set uploaded (by Sbisson; author: Sbisson):

[research/recommendation-api@master] Validate language codes using sitematrix

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

Change #1201739 merged by jenkins-bot:

[research/recommendation-api@master] Validate language codes using sitematrix

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

Change #1202376 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update Recommnedation API to 2025-11-05-230545-production

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

Change #1202376 merged by jenkins-bot:

[operations/deployment-charts@master] Update Recommnedation API to 2025-11-05-230545-production

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

Change #1203450 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update Recommnedation API to 2025-11-07-162011-production

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

Change #1203450 merged by jenkins-bot:

[operations/deployment-charts@master] Update Recommnedation API to 2025-11-07-162011-production

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

I think we concluded that this can move along. We have another task for removing the hardcoded list in CX (T409481) and one for deprecating the list/languagepairs endpoint in CX server (T409932).

Would be good to prioritize those tasks.