Bug 2025823

Summary: The console nav bar ignores plugin separator in existing sections
Product: OpenShift Container Platform Reporter: Yaacov Zamir <yzamir>
Component: Management ConsoleAssignee: Yaacov Zamir <yzamir>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.10CC: aos-bugs, yapei
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:30:15 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:
Description Flags
no seprator in nav menu
separator shown none

Description Yaacov Zamir 2021-11-23 06:40:12 UTC
Description of problem:
The console nav bar ignores plugin separator in existing sections

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

How reproducible:

Steps to Reproduce:
1. Create a plugin that adds a separator nav item in existing section. 

Actual results:
no separator

Expected results:
a separator is displayed

Additional info:

Comment 3 Yadan Pei 2021-12-27 07:18:34 UTC
1. Install odf-operator, create StorageSystem which enables extra navigation menus to 'Storage' primary menu
$ oc get csv -n openshift-storage
NAME                  DISPLAY                       VERSION   REPLACES   PHASE
odf-operator.v4.9.0   OpenShift Data Foundation     4.9.0                Succeeded

2. Check secondary menus in primary menu Storage, there are three new menus added: OpenShift Data Foundation, Object Buckets, Object Bucket Claims, but no separator between 'VolumeSnapshotContents' and 'Object Buckets'

this is checked against 4.10.0-0.nightly-2021-12-23-153012 which already has fix PR merged

$ oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.10.0-0.nightly-2021-12-23-153012   True        False         7h19m   Cluster version is 4.10.0-0.nightly-2021-12-23-153012

$ oc get pods console-58b9c598b5-fm7zp -n openshift-console -o jsonpath="{.spec.containers[0].image}"

$ oc image info quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d8765052f6b2338d92f701466d1a04f69916a56fbbebbcc2d64ff2c9aa6e3045 | grep commit
$ git log a0804fe94b6a2be5147accdf3ab8c8891a296038 | grep '#10476'
    Merge pull request #10476 from yaacov/add-plugin-seperator

Assigning back for confirmation and investigation

Comment 4 Yadan Pei 2021-12-27 07:19:40 UTC
Created attachment 1847892 [details]
no seprator in nav menu

Comment 5 Yaacov Zamir 2022-01-06 15:02:39 UTC
Yadan hi,
You did not check this bug, this bug is about console plugins.

You need to test against a console plugin [1][2] not an k8s plugin [3]

You need to create a plugin using the plugin tempalte [3]
And add a seperator (extention type "console.navigation/separator") and see that it adds a separator.

AFAIK we don't have any customer facing instance of a dyanmic plugin that use "console.navigation/separator" , maybe because it didn't work until this bug fix :-)
so I don't know how to test it on a CI build.

maybe a way to test it will be to add "console.navigation/separator" to the console plugin demo [4] and test on it ?

[1] https://github.com/spadgett/console-plugin-template
[2] https://github.com/kubevirt-ui/kubevirt-plugin
[3] https://github.com/red-hat-storage/odf-operator
[4] https://github.com/openshift/console/tree/master/dynamic-demo-plugin

Comment 7 Yadan Pei 2022-01-11 08:41:26 UTC
1. Added "console.navigation/separator" to dynamic demo plugin as https://github.com/yapei/console/blob/demo-plugin/dynamic-demo-plugin/console-extensions.json#L287~L294, then build dynamic plugin image quay.io/yapei/console-demo-plugin-separator-story:latest
2. Deploy dynamic demo plugin and enable it, refresh console
$ oc apply -f dynamic-demo-plugin/oc-manifest.yaml 
namespace/console-demo-plugin created
deployment.apps/console-demo-plugin created
service/console-demo-plugin created
consoleplugin.console.openshift.io/console-demo-plugin created
3. navigate to Administrator perspective -> Demo Plugin section, we can see a separator is added at the bottom of list 

I think it is working as expected, moving to VERIFIED, verified against 4.10.0-0.nightly-2022-01-10-144202

Do let me know if my steps are wrong, thanks!

Comment 8 Yadan Pei 2022-01-11 08:41:56 UTC
Created attachment 1850051 [details]
separator shown

Comment 9 Yaacov Zamir 2022-01-11 08:51:01 UTC
Yadan, that is a great way to test is, thanks !

Comment 12 errata-xmlrpc 2022-03-10 16:30:15 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.