Bug 2105344

Summary: Console app pod action provider extension is incorrectly defined
Product: OpenShift Container Platform Reporter: Jon Jackson <jonjacks>
Component: Management ConsoleAssignee: Robb Hamilton <rhamilto>
Status: CLOSED ERRATA QA Contact: Yanping Zhang <yanpzhan>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.12CC: yapei
Target Milestone: ---   
Target Release: 4.12.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
No end user impact.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-17 19:51:48 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 Jon Jackson 2022-07-08 15:37:33 UTC
Description of problem:
The pod action provider dynamic plugin extension for console-app is referencing the cronjob action provider hook.

  {
    "type": "console.action/resource-provider",
    "properties": {
      "model": {
        "version": "v1",
        "kind": "Pod"
      },
      "provider": { "$codeRef": "actions.useCronJobActionsProvider" }
    }
  },

Updating this to the correct usePodActionsProvider codeRef causes a runtime error on the Pod details page, traced to the ActionsHookResolver component. 





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

How reproducible:
Always

Steps to Reproduce:
1. Update the pod "console.action/resource-provider" extension provider codeRef property in `packages/console-app/console-extensions.json` to "actions.usePodActionsProvider"
2. Build and run console per usual methods
3. Navigate to a pod details page

Actual results:
A runtime error is encountered on the pod details page

Expected results:
The pod details page should render correctly with appropriate actions dropdown

Additional info:

Component Trace:

at ActionsHookResolver (http://localhost:9000/static/main-a86875208b2f6a230cba.js:38237:3)
    at ActionsLoader (http://localhost:9000/static/main-a86875208b2f6a230cba.js:38325:3)
    at ActionServiceProvider (http://localhost:9000/static/main-a86875208b2f6a230cba.js:37880:3)
    at div
    at h1
    at Text (http://localhost:9000/static/vendor-patternfly-core-7d6c37416eb059e8d97c.js:49012:11)
    at div
    at _c5 (http://localhost:9000/static/main-a86875208b2f6a230cba.js:135475:5)
    at ConnectFunction (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:486863:75)
    at http://localhost:9000/static/main-a86875208b2f6a230cba.js:135118:3
    at ConnectFunction (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:486863:75)
    at Firehose (http://localhost:9000/static/main-a86875208b2f6a230cba.js:135177:5)
    at ConnectFunction (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:486863:75)
    at http://localhost:9000/static/main-a86875208b2f6a230cba.js:103411:5
    at ErrorBoundary (http://localhost:9000/static/main-a86875208b2f6a230cba.js:49390:5)
    at DetailsPage
    at PodsDetailsPage (http://localhost:9000/static/main-a86875208b2f6a230cba.js:125171:106)
    at AsyncComponent (http://localhost:9000/static/main-a86875208b2f6a230cba.js:131150:5)
    at http://localhost:9000/static/main-a86875208b2f6a230cba.js:125840:107
    at ConnectFunction (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:486863:75)
    at Route (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:494694:29)
    at Switch (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:494900:29)
    at Suspense
    at ErrorBoundary (http://localhost:9000/static/main-a86875208b2f6a230cba.js:49390:5)
    at ErrorBoundaryPage
    at section
    at PageSection (http://localhost:9000/static/vendor-patternfly-core-7d6c37416eb059e8d97c.js:43672:11)
    at div
    at div
    at AppContents (http://localhost:9000/static/main-a86875208b2f6a230cba.js:93852:141)
    at div
    at div
    at DrawerMain (http://localhost:9000/static/vendor-patternfly-core-7d6c37416eb059e8d97c.js:34257:5)
    at DrawerContent (http://localhost:9000/static/vendor-patternfly-core-7d6c37416eb059e8d97c.js:34158:5)
    at div
    at Drawer (http://localhost:9000/static/vendor-patternfly-core-7d6c37416eb059e8d97c.js:34052:11)
    at NotificationDrawer (http://localhost:9000/static/main-a86875208b2f6a230cba.js:87103:3)
    at ConnectedNotificationDrawer_ (http://localhost:9000/static/main-a86875208b2f6a230cba.js:123688:3)
    at ConnectFunction (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:486863:75)
    at main
    at div
    at Page (http://localhost:9000/static/vendor-patternfly-core-7d6c37416eb059e8d97c.js:43235:9)
    at div
    at div
    at DrawerContentBody (http://localhost:9000/static/vendor-patternfly-core-7d6c37416eb059e8d97c.js:34192:5)
    at div
    at div
    at DrawerMain (http://localhost:9000/static/vendor-patternfly-core-7d6c37416eb059e8d97c.js:34257:5)
    at DrawerContent (http://localhost:9000/static/vendor-patternfly-core-7d6c37416eb059e8d97c.js:34158:5)
    at div
    at Drawer (http://localhost:9000/static/vendor-patternfly-core-7d6c37416eb059e8d97c.js:34052:11)
    at QuickStartDrawer (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:10186:11)
    at QuickStartsLoader (http://localhost:9000/static/main-a86875208b2f6a230cba.js:13844:3)
    at QuickStartDrawer (http://localhost:9000/static/quick-start-4f442952c7e04f74e869.js:208:5)
    at AsyncComponent (http://localhost:9000/static/main-a86875208b2f6a230cba.js:131150:5)
    at QuickStartDrawerAsync (http://localhost:9000/static/main-a86875208b2f6a230cba.js:13687:5)
    at EnhancedProvider (http://localhost:9000/static/main-a86875208b2f6a230cba.js:94374:13)
    at QuickStartContextProvider (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:8831:38)
    at EnhancedProvider (http://localhost:9000/static/main-a86875208b2f6a230cba.js:94374:13)
    at EnhancedProvider (http://localhost:9000/static/main-a86875208b2f6a230cba.js:94374:13)
    at EnhancedProvider (http://localhost:9000/static/main-a86875208b2f6a230cba.js:94374:13)
    at DetectNamespace (http://localhost:9000/static/main-a86875208b2f6a230cba.js:12343:3)
    at DetectPerspective (http://localhost:9000/static/main-a86875208b2f6a230cba.js:12841:3)
    at DetectCluster (http://localhost:9000/static/main-a86875208b2f6a230cba.js:12103:3)
    at App_ (http://localhost:9000/static/main-a86875208b2f6a230cba.js:94392:5)
    at AppWithExtensions (http://localhost:9000/static/main-a86875208b2f6a230cba.js:94545:144)
    at I18nextWithTranslation (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:481962:31)
    at Route (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:494694:29)
    at Switch (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:494900:29)
    at Router (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:494323:30)
    at AppRouter (http://localhost:9000/static/main-a86875208b2f6a230cba.js:94567:111)
    at ToastProvider (http://localhost:9000/static/main-a86875208b2f6a230cba.js:64631:3)
    at AppInitSDK (http://localhost:9000/static/main-a86875208b2f6a230cba.js:25299:3)
    at ThemeProvider (http://localhost:9000/static/main-a86875208b2f6a230cba.js:93301:3)
    at Provider (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:486576:20)
    at Suspense

Stack Trace:

TypeError: useValue is not a function or its return value is not iterable
    at ActionsHookResolver (http://localhost:9000/static/main-a86875208b2f6a230cba.js:38244:38)
    at renderWithHooks (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:467107:18)
    at mountIndeterminateComponent (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:469933:13)
    at beginWork (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:471171:16)
    at HTMLUnknownElement.callCallback (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:456067:14)
    at Object.invokeGuardedCallbackDev (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:456116:16)
    at invokeGuardedCallback (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:456178:31)
    at beginWork$1 (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:476081:7)
    at performUnitOfWork (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:474893:12)
    at workLoopSync (http://localhost:9000/static/vendors~main-7d1e7fae8bad0238887b.js:474824:5)

Comment 2 Yanping Zhang 2022-07-26 10:06:12 UTC
Checked on ocp 4.12 with payload 4.12.0-0.nightly-2022-07-25-203438, the pod details page shows up without error.
Also build code and run console locally, access pod details page, there is no error.

Comment 5 errata-xmlrpc 2023-01-17 19:51:48 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.12.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.

https://access.redhat.com/errata/RHSA-2022:7399