Bug 2021337 - Dynamic Plugins: ResourceLink doesn't render when passed a groupVersionKind
Summary: Dynamic Plugins: ResourceLink doesn't render when passed a groupVersionKind
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.10.0
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-08 22:06 UTC by Samuel Padgett
Modified: 2022-03-10 16:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:26:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 10411 0 None open Bug 2021337: Fix ResourceLink groupVersionKind 2021-11-08 22:07:57 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:26:27 UTC

Description Samuel Padgett 2021-11-08 22:06:02 UTC
ResourceLink was updated to accept either a kind prop (deprecated) or a groupVersionKind. The logic immediately returns null when there is no `kind` passed, however. See

https://github.com/openshift/console/pull/10303/files#diff-d3568c7e918c75c60442aa17ba40182cb893f3cc6e7cbeb1ffeb655f38e74255R88

Comment 3 Yadan Pei 2021-11-15 10:50:05 UTC
this bug can be verified by inspecting code changes


with current changes: 

if (!kind && !groupVersionKind) {
    return null;
}

console only returns null when neither kind and groupVersionKind are present 

moving to VERIFIED

Comment 4 Yadan Pei 2021-11-15 10:51:47 UTC
moving back to ON_QA and more research is needed

Comment 5 Samuel Padgett 2021-11-15 13:12:51 UTC
Yadan, I have a plugin which uses this API if you need it:

https://github.com/spadgett/console-customization-plugin/blob/main/src/components/CustomizationList.tsx#L89-L93

Comment 6 Yadan Pei 2021-11-16 00:52:13 UTC
Thanks Sam : ) 

1. Deploy a console-customization plugin with file https://raw.githubusercontent.com/spadgett/console-customization-plugin/main/oc-manifest.yaml
$ oc apply -f oc-manifest.yaml 
namespace/console-customization-plugin created
deployment.apps/console-customization-plugin created
service/console-customization-plugin created
consoleplugin.console.openshift.io/console-customization created

2. Enable console-customization dynamic plugin and refresh console
3. Navigate to Administration -> Customization or visit /customization, check the customized resource table and resource links in the row, the resource links are correctly rendered(clicking on any resource link will redirect user to correct resource page) 

verified on 4.10.0-0.nightly-2021-11-15-034648

Comment 10 errata-xmlrpc 2022-03-10 16:26:09 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.10.3 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-2022:0056


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