Skip to content

Fix singleton getUIConfig issue #17047

@aalves08

Description

@aalves08

Setup

  • Rancher version: reproduced with 2.13.2
  • Rancher UI Extensions: Extension with shell 3.0.10 and a custom list view
  • Browser type & version: n/a

Describe the bug

In Dashboard we introduced ExtensionPoint.TABLE = 'Table' in @rancher/shell 3.0.9, but the Rancher 2.13 dashboard's extension manager singleton was never rebuilt with that enum value.

Dashboard creates the singleton via createExtensionManager() in extension-manager-impl.js. At initialisation, it loops over ExtensionPoint and creates uiConfig keys — but the 2.13 Dashboard's ExtensionPoint enum doesn't include 'Table'.

The extension bundles @rancher/shell 3.0.10 which does have ExtensionPoint.TABLE. When Dashboard components call getApplicableExtensionEnhancements() from plugin-helpers.ts, it calls $extension.getUIConfig('Table', uiArea) on the singleton at extension-manager-impl.js

return uiConfig[type][uiArea] || [];

which throws the errror: uiConfig['Table'] is undefined

Biggest problem is that even though ExtensionPoint.TABLE exists in this new shell, the Dashboard uses its own bundled singleton, not the extension's/shell copy, so it doesn't recognise it and therefore throws the error.

This brings increased difficulty in resolving this matter Shell side

To Reproduce

  • provision a Rancher 2.13 system
  • build an extension with a custom list view with shell 3.0.10 locally
  • do yarn serve-pkgs and do a developer load
  • go to the custom list view page of the extension and observe the browser console

Result
Throws a console error

Expected Result

Should not throw a console error

Screenshots

Image

Additional context

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions