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):
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
Extension tab does not show up.
Extension tab should show up.
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
I tested the fix by applying oc-manifest.yaml with image quay.io/yapei/console-demo-plugin:411
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.