Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1927310

Summary: Performance: Console makes unnecessary requests for en-US messages on load
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: Yanping Zhang <yanpzhan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, jokerman, yapei
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A performance fix was made to remove unnecessary HTTP requests on web console load when the user's locale is set to `en-US`.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:43:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1927311    

Description Samuel Padgett 2021-02-10 13:54:23 UTC
Console supports English messages using the `en` language only. We don't have separate messages for locales like `en-US` and `en-GB`. Currently, the way i18next is configured, console tries to get the `en-US` messages first, which causes dozens of 404 network requests. It doesn't result in any user-visible errors, but it slows down console load, particularly since browser limit how many requests can be made in parallel. This can slow down console load by more than a second in some cases.

We should configure i18next to use the language-only when requesting a namespace to avoid the unnecessary requests.

Comment 2 Yanping Zhang 2021-02-20 10:00:22 UTC
https://github.com/openshift/console/pull/8100/files
Checked on ocp 4.8 cluster with payload 4.8.0-0.nightly-2021-02-19-111007.
Login in console, open developer console by click F12, check the console log, there is no "en-US" requesting message shown.
@Sam, not sure if it's correct to check developer console log to verify this bug, could you give some suggestions?

Comment 3 Samuel Padgett 2021-02-20 20:49:42 UTC
That's the right way to verify. If the bug wasn't fixed, you'd see many 404 Not Found messages for en-US JSON files.

Comment 4 Yanping Zhang 2021-02-22 02:35:35 UTC
Thanks, Sam!
Checked again on ocp 4.8 cluster with payload 4.8.0-0.nightly-2021-02-21-102854. on console there is no 404 Not Found message for en-US JSON files now, the bug is fixed.

Comment 7 errata-xmlrpc 2021-07-27 22:43:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438