Hide Forgot
There are two technical issues that prevent us from using new extension types via `console-extensions.json` file in Console static plugins: (1) generated code ref functions are missing the `CodeRef` symbol, which is used to differentiate between regular functions vs. executable code refs (2) validation of code refs based on Node.js `require()` breaks the build when the exposed module isn't strictly plain JavaScript
This bug does not affect existing code in 4.7 so re-targeting to 4.8 release.
1. clone latest 'master' branch of console code # build a one-time development build of Console web app cd frontend ; yarn dev-once Build bridge command and run console bridge server # cd /path/to/console_repo # ./build-backend.sh # oc login -u kubeadmin -p $(cat /path/to/install-dir/auth/kubeadmin-password) # source ./contrib/oc-environment.sh # ./bin/bridge 2. Open browser console and execute > window.pluginStore.getAllExtensions().filter((e) => e.pluginID === '@console/kubevirt-plugin') // this returns all extensions contributed by the existing Kubevirt plugin. At the end of the array, there is extension with type console.page/route/standalone > inspect the last element in array, Symbol(CodeRef): true is there {type: "console.page/route/standalone", properties: {…}, flags: {…}, pluginID: "@console/kubevirt-plugin", pluginName: "@console/kubevirt-plugin", …} flags: {required: Array(0), disallowed: Array(0)} pluginID: "@console/kubevirt-plugin" pluginName: "@console/kubevirt-plugin" properties: component: () => {…} Symbol(CodeRef): true arguments: (...) caller: (...) length: 0 name: "" __proto__: ƒ () [[FunctionLocation]]: active-plugins.js:92 [[Scopes]]: Scopes[2] exact: false path: "/standalone/k8s/ns/:ns/virtualmachineinstances/:name/console" __proto__: constructor: ƒ Object() hasOwnProperty: ƒ hasOwnProperty() isPrototypeOf: ƒ isPrototypeOf() propertyIsEnumerable: ƒ propertyIsEnumerable() toLocaleString: ƒ toLocaleString() toString: ƒ toString() valueOf: ƒ valueOf() __defineGetter__: ƒ __defineGetter__() __defineSetter__: ƒ __defineSetter__() __lookupGetter__: ƒ __lookupGetter__() __lookupSetter__: ƒ __lookupSetter__() get __proto__: ƒ __proto__() set __proto__: ƒ __proto__() type: "console.page/route/standalone" uid: "@console/kubevirt-plugin[37]" __proto__: Object also run `yarn build` within frontend directory succeeded without errors Moving to VERIFIED
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