Bug 2021337

Summary: Dynamic Plugins: ResourceLink doesn't render when passed a groupVersionKind
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.10CC: aos-bugs, yapei
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:26:09 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-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