Bug 1996159

Summary: Dynamic Plugins: Visiting a plugin route directly causes a 404 page to flash briefly
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Management ConsoleAssignee: Vojtech Szocs <vszocs>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.9CC: aos-bugs, jhadvig, jokerman, yapei
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-18 17:47:54 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:

Description Samuel Padgett 2021-08-20 17:40:46 UTC
We load dynamic plugins asynchronously. This means there is a race if you directly enter a plugin route in the browser URL bar. The page briefly shows a 404 error until the plugin is fully loaded, after which the page appears as expected. We should wait until all plugins load before showing a 404 error.

Comment 1 Samuel Padgett 2021-08-24 18:39:12 UTC
https://github.com/openshift/console/pull/9559 adds a `useDynamicPluginInfo` hook which returns `allPluginsProcessed`. We should be able to update the 404 page to check if `allPluginsProcessed` after that PR merges.

Comment 4 Yadan Pei 2021-09-02 06:26:40 UTC
1. build a dynamic plugin image quay.io/yapei/console-demo-plugin:statusandicon and deploy to the cluster 
$ oc apply -f oc-manifest.yaml 
namespace/console-demo-plugin created
deployment.apps/console-demo-plugin created
service/console-demo-plugin created
consoleplugin.console.openshift.io/console-demo-plugin created

2. Enable the dynamic plugin
3. visit ${CONSOLE}/test-consumer and ${CONSOLE}/example/nav/ page, the page is showing a loading icon until the pages are successfully completely loaded, no 404 page now

Verified on 4.9.0-0.nightly-2021-08-31-123131

Comment 7 errata-xmlrpc 2021-10-18 17:47:54 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.9.0 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:3759