Bug 2015654 - Plugins that don't use i18n greatly slow down initial console load
Summary: Plugins that don't use i18n greatly slow down initial console load
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.10
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: Yadan Pei
Depends On:
TreeView+ depends on / blocked
Reported: 2021-10-19 19:21 UTC by Samuel Padgett
Modified: 2024-04-30 18:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Version: 4.10.0-0.nightly-2021-10-16-173656 Cluster ID: 1fb11d8f-1d44-4ad2-9982-eeb985a74a2f Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
Last Closed: 2024-04-30 18:04:53 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift console pull 10378 0 None open Bug 2015654: Separate handler for i18n proxy requests 2021-11-02 13:49:55 UTC

Description Samuel Padgett 2021-10-19 19:21:14 UTC
Console will always try to fetch an i18n namespace for all enabled plugins, regardless of whether the plugin supports i18n. The console will block loading and retry several times trying to fetch the namespace, which greatly slows down the console load. We either need a way for plugins to opt in to using i18n or we need a way to fail quickly if the namespace isn't there. (It might be difficult for plugins to opt in without making an API breaking change.)

Comment 1 Jakub Hadvig 2021-10-21 08:36:44 UTC
@Sam so one solution could be to as you mentioned to have a field on the ConsolePlugin instance, which would determine if the plugin's i18n should be loaded.

Other solution is to have a dedicated annotation on the ConsolePlugin instance, something like `console.openshift.io/plugins: true`. Upon console server start the backend will fetch all the enabled ConsolePlugins and check for the annotation. If the annotation is missing then we could default to `false`.
I know that this second solution is not ideal but we can document the approach properly + we dont introduce breaking change. Once we decide to bump the ConsolePlugin to v1beta1 or even v1 we can handle the i18n properly.

Comment 3 Samuel Padgett 2021-11-10 12:19:34 UTC
Reopening the bug. I think we want to look more closely at this to see if we can avoid the 404 request altogether. See comment https://github.com/openshift/console/pull/10378#issuecomment-965077285

Comment 8 Jakub Hadvig 2022-06-17 09:43:40 UTC
This issue was delivered by https://issues.redhat.com/browse/CONSOLE-3162 story.
Now the console will pre-fetch the i18n namespace only for plugins that contain the `console.openshift.io/use-i18n` annotation.
Putting on ON_QA.

Comment 9 Yadan Pei 2022-06-20 09:27:40 UTC
If dynamic plugin doesn't have `console.openshift.io/use-i18n` annotation or set it to 'false', console will not load plugin i18n namespace


verified on 4.11.0-0.nightly-2022-06-18-081846

Comment 10 Rory Thrasher 2024-04-30 18:04:53 UTC
OCP is no longer using Bugzilla and this bug appears to have been left in an orphaned state. If the bug is still relevant, please open a new issue in the OCPBUGS Jira project: https://issues.redhat.com/projects/OCPBUGS/summary

Note You need to log in before you can comment on or make changes to this bug.