Bug 2022124 - Dynamic Plugins: useK8sWatchResource doesn't work for core resource using the groupVersionKind property
Summary: Dynamic Plugins: useK8sWatchResource doesn't work for core resource using the...
Keywords:
Status: CLOSED DUPLICATE of bug 2027311
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: Jakub Hadvig
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-10 19:42 UTC by Samuel Padgett
Modified: 2021-12-14 16:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Version: 4.10.0-0.nightly-2021-11-09-181140 Cluster ID: b60dd994-0676-4a81-9cdd-a212351e3ecf Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.114 Safari/537.36
Last Closed: 2021-12-14 16:45:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Samuel Padgett 2021-11-10 19:42:32 UTC
The following code doesn't work:

  const [podsData, podsLoaded, podsError] = useK8sWatchResource<{}[]>({
      groupVersionKind: { version: 'v1', kind: 'Pod' },
      namespace: 'openshift-console',
      isList: true,
      namespaced: true,
  });

`useK8sWatchResource` calls `getReference` on `groupVersionKind`, which returns `core~v1~Pod`. However, the model key for Pods in `Pod` in Redux, so the watch hook doesn't find the model when calling `k8s.getIn(['RESOURCES', 'models', kindReference])`.

Comment 1 Kim Dobestein 2021-12-13 16:18:55 UTC
Putting this back into the "pool" so it can be re-triaged and reassigned.

Comment 2 Samuel Padgett 2021-12-14 16:45:35 UTC

*** This bug has been marked as a duplicate of bug 2027311 ***


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