Project

General

Profile

Bug #42693

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

Added by Sebastian Krah 11 months ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Category:
dashboard/build
Target version:
% Done:

0%

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

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.

History

#1 Updated by Sebastian Krah 10 months ago

  • Status changed from New to Fix Under Review

#2 Updated by Lenz Grimmer 10 months ago

  • Target version set to v15.0.0
  • Pull request ID set to 31727

#3 Updated by Lenz Grimmer 10 months ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF