Bug 2055980 - [dynamic SDK][internal] console plugin SDK does not support table actions
Summary: [dynamic SDK][internal] console plugin SDK does not support table actions
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.11
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.11.0
Assignee: Jakub Hadvig
QA Contact: Xiyun Zhao
Depends On:
TreeView+ depends on / blocked
Reported: 2022-02-18 05:28 UTC by Yaacov Zamir
Modified: 2023-09-15 01:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-08-10 10:50:27 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift console pull 11074 0 None open Bug 2055980: Expose more components/hooks/etc. needed by KubeVirt dynamic plugin 2022-02-18 05:30:11 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:51:03 UTC

Description Yaacov Zamir 2022-02-18 05:28:44 UTC
Description of problem:
When using actions plugins, table and details pages consume this actions via `LazyActionMenu` , without this component or an equivalent one a dynamic plugin can not take full advantage of the actions extension.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. In a dynamic plugin, create an action extension with an action factory method for a CRD
2. In a custome list or details view of a CRD try to consume the actions link to the CRD

Actual results:
Functionality missing

Expected results:
A component that renders the actions registered to the CRD object exit

Additional info:

Comment 3 Yadan Pei 2022-02-21 07:53:59 UTC
Hi Yaacov Zamir,

May I know how did you add customization extensions in console-extensions.json? For example, may I know the JSON object you've added? That would definitely help ~ 

something like this? 

    "type": "console.navigation/href",
    "properties": {
      "id": "admin-dynamic-route-2",
      "perspective": "admin",
      "section": "admin-demo-section",
      "name": "%plugin__console-demo-plugin~Dynamic Nav 2%",
      "href": "/dynamic-route-2"

Comment 4 Yadan Pei 2022-03-03 08:09:41 UTC

Is it possible that pointing me an example extension so that I can verify the bug? Thanks very much ~

Comment 5 Yadan Pei 2022-03-07 10:15:04 UTC
1. Install 'OpenShift Virtualization' 4.9.3 on a 4.11 cluster
oc get csv -n openshift-cnv
NAME                                      DISPLAY                    VERSION   REPLACES                                  PHASE
kubevirt-hyperconverged-operator.v4.9.3   OpenShift Virtualization   4.9.3     kubevirt-hyperconverged-operator.v4.9.2   Succeeded

2. Create OpenShift Virtualization Deployment instance 'kubevirt-hyperconverged'
oc get hyperconverged kubevirt-hyperconverged -n openshift-cnv
NAME                      AGE
kubevirt-hyperconverged   33m

3. Wait unitl 'Virtualization' nav menu appears, navigate to 'VirtualMachines', create some VMs and check the Kebab actions on VM list page and Actions menus on VM detail page, all actions are working as expected

However I tried the exact same steps on a 4.10 cluster and all actions are working well too.

Is there any user visible changes I can use to verify?

Comment 6 Yadan Pei 2022-03-07 10:17:57 UTC
I search `LazyActionMenu` in https://github.com/kubevirt-ui/kubevirt-plugin and found two entries

one is imported and used in src/views/virtualmachinesinstance/actions/VirtualMachinesInstanceActions.tsx
the other is imported and used in  src/views/virtualmachines/list/components/VirtualMachineActions/VirtualMachineActions.tsx 

so I tried with steps in comment 5 to verify from a user perspective, but it appears I didn't reproduce the issue on a cluster without the fix, so I maybe wrong

Comment 7 Xiyun Zhao 2022-03-22 16:55:56 UTC
This bug has been verified on the payload 4.11.0-0.nightly-2022-03-20-113855 and the newest console repo

This bug is about missing API, which is needs to verify that if the LazyAction Menu component is exposed via Console plugin SDK/internal package
Verification Step:
1. Git clone console repo to local, find ':azyActionMenu' component code
   $ cd frontend/packages/console-dynamic-plugin-sdk
   $ grep -rl 'LazyActionMenu' src
2. Check if the component code of 'LazyActionMenu' is in ininternal-api.ts
3. yarn install in frontend
   $ cd ./frontend
   $ yarn install
4. Verify if the LazyActionMenu is being exported on file of internal-api.js
   $ vi frontend/packages/console-dynamic-plugin-sdk/dist/internal/lib/api/internal-api.js

1. Below list information can be found in internal-api.js file which verifies the LazyActionMenu component is indeed exposed via the internal SDK package
   export const LazyActionMenu = require('@console/shared/src/components/actions/LazyActionMenu').default;

Additional information:

Comment 9 errata-xmlrpc 2022-08-10 10:50:27 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 (Important: OpenShift Container Platform 4.11.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.


Comment 10 Red Hat Bugzilla 2023-09-15 01:52:01 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days

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