Project

General

Profile

Bug #42693

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

Added by Sebastian Krah about 1 year ago. Updated about 2 months ago.

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

0%

Source:
Tags:
Backport:
nautilus
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.

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


Related issues

Copied to mgr - Backport #47753: nautilus: mgr/dashboard: current frontend build workflow can cause e2e failures Resolved

History

#1 Updated by Sebastian Krah about 1 year ago

  • Status changed from New to Fix Under Review

#2 Updated by Lenz Grimmer about 1 year ago

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

#3 Updated by Lenz Grimmer about 1 year ago

  • Status changed from Fix Under Review to Resolved

#4 Updated by Nizamudeen A about 2 months ago

  • Status changed from Resolved to Pending Backport
  • Backport set to nautilus

#5 Updated by Nizamudeen A about 2 months ago


It would be good to create a backport for this issue in nautilus. It would resolve issues like the missing whitespace between the Edit and Pool in button and also in headings.

#6 Updated by Nizamudeen A about 2 months ago

  • Copied to Backport #47753: nautilus: mgr/dashboard: current frontend build workflow can cause e2e failures added

#7 Updated by Lenz Grimmer about 2 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF