Bug 2068115

Summary: resource tab extension fails to show up
Product: OpenShift Container Platform Reporter: cvogt
Component: Management ConsoleAssignee: Andrew Ballantyne <aballant>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.10CC: aos-bugs, jhadvig, yapei
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2069246 (view as bug list) Environment:
Last Closed: 2022-08-10 11:01:08 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:
Bug Depends On:    
Bug Blocks: 2069246    

Description cvogt 2022-03-24 13:53:44 UTC
Description of problem:
The resource tab extension ('console.page/resource/tab') fails to show up when the model match includes a `version` along with the `group` and `kind`.

The problem is a result of using the wrong function to convert the model to a reference string for comparison:

`referenceFor` is used instead of `referenceForModel`

Additionally it looks like the extension definition is incorrect as `href` is marked optional but it should be required or a path be required. 

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

How reproducible:

Steps to Reproduce:
1. create a `console.page/resource/tab` extension
2. set the model to have version=v1, group=project.openshift.io, kind=project
3. load the plugin in console
4. navigate to a project details page

Actual results:
Extension tab does not show up.

Expected results:
Extension tab should show up.

Additional info:

Comment 3 Yadan Pei 2022-04-14 02:59:21 UTC
1. with console.page/resource/tab extensions added in https://github.com/openshift/console/blob/master/dynamic-demo-plugin/console-extensions.json#L189%EF%BD%9EL201
2. load plugin
3. navigate to project details page, we can see 'Demo Plugin' tab showing up

verified on 4.11.0-0.nightly-2022-04-12-072444

Comment 4 Yadan Pei 2022-04-14 03:00:04 UTC
I tested the fix by applying oc-manifest.yaml with image quay.io/yapei/console-demo-plugin:411

Comment 6 errata-xmlrpc 2022-08-10 11:01:08 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.