Bug 2015654

Summary: Plugins that don't use i18n greatly slow down initial console load
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: VERIFIED --- QA Contact: Yadan Pei <yapei>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.10CC: aos-bugs, cvogt, yapei
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
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: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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