Bug 1650464

Summary: [admin] Should not display No Roles Found when listing all Roles
Product: OpenShift Container Platform Reporter: XiaochuanWang <xiaocwan>
Component: Management ConsoleAssignee: Jon Jackson <jonjacks>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 4.1.0CC: aos-bugs, jokerman, mmccomas, spadgett
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Resources loaded through the ConnectToState component (in firehose.jsx) were considered collectively loaded if the loaded state of all required resources was true. Optional resources' loaded state was not being checked. This means that the loaded prop set by this component could be true before optional resources were finished loading. Consequence: When optional resources are passed to FIrehose, and no required resources exist, an empty state might be displayed momentarily before optional resources have a chance to finish loading. Fix: The logic for setting the 'loaded' prop created in ConnectToState is now as follows: - Optional resources are considered loaded if and only if either their loaded state is true or their loadError state is not empty. - Required resources are considered loaded if and only if their loaded state is true - If all optional and required resources are considered loaded by the above logic, the loaded prop will be true. Result: An empty state is no longer displayed before optional components are finished loading.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-16 21:30:10 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 XiaochuanWang 2018-11-16 09:03:35 UTC
Description of problem:
It always displays "No Roles Found" first before all roles are listed. It's confused when something stuck on the console and the current message shows, because currently no roles are listed.

Version-Release number of selected component (if applicable):
Openshift v4.0.0-0.58.0
registry.reg-aws.openshift.com:443/openshift/ose-console                   v4.0                05355e76d820 

How reproducible:
always

Steps to Reproduce:
1. Normal user login and check Administration -> Roles page.
2. Cluster-admin user login and check Administration -> Role Bindings page.


Actual results:
Both displays "No Roles Found" or "No Role Bindings Found" before all items listed.

Expected results:
Should not display "No Roles Found" or "No Role Bindings Found".
Better to keep the the Loading icon or some message meaning the loading process.

Additional info:

Comment 1 Jon Jackson 2018-12-13 20:28:11 UTC
Fixed by https://github.com/openshift/console/pull/943

Comment 2 Jon Jackson 2018-12-18 19:25:03 UTC
https://github.com/openshift/console/pull/943

Comment 3 XiaochuanWang 2019-01-15 09:05:59 UTC
It only displays the Loading icon now. Mark it Verified on the version:
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE     STATUS
version   4.0.0-0.nightly-2019-01-15-010905   True        False         11m       Cluster version is 4.0.0-0.nightly-2019-01-15-010905

"version": "v4.0.0"
"release": "0.139.0.0",