Project

General

Profile

Actions

Bug #42693

closed

mgr/dashboard: current frontend build workflow can cause e2e failures

Added by Anonymous over 4 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Build, CI, Dependencies & Tools
Target version:
% Done:

0%

Source:
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The way how we build the frontend, since we moved from JIT to AOT, can cause problem when running e2e tests.

I'd like to highlight those 2 lines:

"build-i18n": "export _locale=${LOCALE:-$npm_package_config_locale}; [ -f src/locale/messages.${_locale}.xlf ] && npm run build -- --outputPath=dist/${_locale} --i18nFile=src/locale/messages.${_locale}.xlf --i18nLocale=${_locale}",

"build:en-US": "LOCALE=en-US npm run build-i18n",

As you can see, when running the build:en-US script, we set the locale to en-US. Then we call the build-i18n script. In this script the locale will be used to find the correct xlf file for the package that should be built (src/locale/messages.${_locale}.xlf ).

This alone is not a big problem, but it can cause some.

Imagine one rephrases the text of the menu item Dashboard to Dashb. Also imagine that a test exists which checks if a menu item with the text Dashboard exists. To prevent any failures the person who changed the text to Dashb. would also update the test. But against all assumptions the test would still fail, because the messages.en-US.xlf hasn't been updated. To do this, one would have to run the i18n script and update the translation files, because the test would have been updated but the text would remain Dashboard until one updated the translations.


Files

image.png (2.85 KB) image.png Nizamudeen A, 10/05/2020 02:30 PM

Related issues 1 (0 open1 closed)

Copied to Dashboard - Backport #47753: nautilus: mgr/dashboard: current frontend build workflow can cause e2e failuresResolvedNizamudeen AActions
Actions

Also available in: Atom PDF