rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
454 stars 257 forks source link

[Extensions] Vue 2.7 Support for Composition API #10543

Closed rak-phillip closed 2 months ago

rak-phillip commented 7 months ago

In preparation for the Vue 3 migration of Dashboard, we attempted to migrate our usage of Vue.extend() to defineComponent via issue rancher/dashboard#10104.

While transitioning to the new syntax was smooth for most of Dashboard, we encountered issues when loading extensions, resulting in an error that stems from our usage of defineComponent:object(...) is not a function`.

This behavior aligns with the documentation on API exposure in Vue 2.7^1; Dashboard targets ESM builds of Vue, whereas bundled extensions target UMD. This lack of compatibility between the two build types is the source of this issue.

Actual Behavior

Rancher Dashboard fails to load an extension that utilizes backported Vue 3 features, displaying an error in the console: object(...) is not a function

Expected Behavior

Rancher Dashboard properly loads an extension that utilizes backported Vue 3 features.

rak-phillip commented 7 months ago

@gaktive @nwmac We will need to backport this for v2.8, but I want to make sure that we are targeting the correct milestone before doing so.

rak-phillip commented 7 months ago

This issue will require a release note for extension authors to communicate that new extensions that utilize coming changes in https://github.com/rancher/dashboard/issues/10543 will not be backwards compatible with older versions of dashboard. Existing extensions should continue to work moving forward.

rak-phillip commented 7 months ago

/backport v2.8.next2

gaktive commented 5 months ago

If testing for #10568 passes, then QA can decide to retest for 2.9.0.

eva-vashkevich commented 2 months ago

Confirmed that Kubewarden, CAPI and Elemental work on latest master.