Bug 2027311 - K8s watch hooks do not work when fetching core resources
Summary: K8s watch hooks do not work when fetching core resources
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.10.0
Assignee: Rastislav Wagner
QA Contact: Yadan Pei
URL:
Whiteboard:
: 2022124 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-29 11:29 UTC by Rastislav Wagner
Modified: 2022-03-10 16:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:30:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 10571 0 None open Bug 2027311: Fix k8s watch hooks to work with core resources 2021-11-29 17:15:47 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:30:57 UTC

Description Rastislav Wagner 2021-11-29 11:29:35 UTC
Description of problem:
A new format {group, version, kind} can be used with k8s watch hooks but it does not work for core resources.


How reproducible:
always


Steps to Reproduce:
1. update demo plugin to use new format https://github.com/openshift/console/blob/master/dynamic-demo-plugin/src/components/ListPage.tsx#L87


const [pods, loaded, loadError] = useK8sWatchResource<K8sResourceCommon[]>({
    groupVersionKind: {
      version: 'v1',
      kind: 'Pod',
    },
    isList: true,
    namespaced: true,
  });


2. build the plugin and go to demo list page
3. pods are not loaded

Actual results:
pods are not loaded

Expected results:
pods are loaded


Additional info:

Comment 1 Samuel Padgett 2021-12-14 16:45:35 UTC
*** Bug 2022124 has been marked as a duplicate of this bug. ***

Comment 3 Yadan Pei 2021-12-20 10:12:44 UTC
1. with demo plugin list page codes as following https://github.com/openshift/console/blob/master/dynamic-demo-plugin/src/components/ListPage.tsx#L85~L93

const ListPage = () => {
  const [pods, loaded, loadError] = useK8sWatchResource<K8sResourceCommon[]>({
    groupVersionKind: {
      version: 'v1',
      kind: 'Pod',
    },
    isList: true,
    namespaced: true,
  });


2. build dynamic demo plugin and enable the plugin
3. navigate to Demo Plugin -> List Page, pods list are loaded without error

verified on 4.10.0-0.nightly-2021-12-18-034942

Comment 8 errata-xmlrpc 2022-03-10 16:30:41 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


Note You need to log in before you can comment on or make changes to this bug.