Description of problem: Some fixes are needed to ensure Console dynamic plugins are loaded properly in the browser. Issue details: (1) loadPluginFromURL function should wait until the plugin is loaded (2) generated plugin-entry.js file should use /api/plugins/{PluginName}/ to load plugin-specific assets (3) extension validation should not fail upon plugin's production build (due to webpack module concatenation) Tech docs reference: https://github.com/openshift/console/blob/master/frontend/packages/console-dynamic-plugin-sdk/README.md
1) Clone Console repo and make sure you're on the right branch: git checkout -b release-4.x origin/release-4.x For 4.7 branch, apply the changes in PR 8780. (For 4.8 branch, these changes are already there.) 2) Build Bridge backend & Console web frontend: ./build.sh 3) Build Console dynamic demo plugin: ( cd frontend/dynamic-demo-plugin ; yarn ; yarn build ) 4) Start local demo plugin asset server: ( cd frontend/dynamic-demo-plugin ; yarn http-server ) 5) Start local Bridge server and connect it with above plugin: source ./contrib/oc-environment.sh && ./bin/bridge -plugins console-demo-plugin=http://localhost:9001/ 6) visit localhost:9000 We can see logs in browser console: Dynamic plugins: [console-demo-plugin] Loading plugin manifest from http://localhost:9000/api/plugins/console-demo-plugin/plugin-manifest.json Loading entry script for plugin console-demo-plugin.0 from http://localhost:9000/api/plugins/console-demo-plugin/plugin-entry.js Added plugin console-demo-plugin.0 Plugin console-demo-plugin.0 is now enabled The plugin is loaded and enabled successfully In another way 1) follow steps in https://github.com/openshift/console/tree/master/frontend/dynamic-demo-plugin#docker-image to build a docker image 2) 2) replace the image in oc-manifest.yaml https://github.com/openshift/console/tree/master/frontend/dynamic-demo-plugin#deployment-on-cluster and create resources defined 3) enable plugin https://github.com/openshift/console/tree/master/frontend/dynamic-demo-plugin#enabling-the-plugin at last check browser console logs, we should see the same log with above Verified on 4.8.0-0.nightly-2021-04-26-151924
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