# Kibana development - migrate/upgrade plugins from 7.3.x to 7.9.x

**URL:** <https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741>\
**Category:** Kibana\
**Tags:** kibana-plugin-development\
**Created:** [October 12, 2020, 9:52am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741 "2020-10-12T09:52:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsvet](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tsvet](https://discuss.elastic.co/u/tsvet)\
**Post date:** [October 12, 2020, 9:52am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/1 "2020-10-12T09:52:03Z")

</div>

Hi,  
I have custom plugins that are compatible with Kibana 7.3.2 . And usually moving from one version to another is not that hard (especially if it is not a major release).  
I have read that for version 7.9+ there is a new architecture called "New platform".  
Also I saw that legacy core will be obsolete from version 7.10.  
My question is:  
Can we easily make our plugins compatible with 7.9.x? .. and then to plan to upgrade them to the "New platform" or we have to upgrade to the new platform if we wanna use kibana 7.9?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [October 12, 2020, 11:13pm UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/2 "2020-10-12T23:13:35Z")

</div>

Hi @tsvet. You might want to read the [Platform Migration documentation](https://github.com/elastic/kibana/blob/master/src/core/MIGRATION.md) for migrating your plugins to the new architecture. I believe some legacy plugins can still work in 7.9, but I strongly suggest migrating to avoid conflicts.

---

<div class="post-metadata">

**Author:** ![tsvet](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tsvet](https://discuss.elastic.co/u/tsvet)\
**Post date:** [October 13, 2020, 7:50am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/3 "2020-10-13T07:50:04Z")

</div>

Ok, thanks @nickpeihl .. yes, that is clear but we are planning to upgrade our ELK stack and I just wanted to know which version to choose (based on our plugin compatibility).  
Is there a chance to ask someone from your team about this topic?  
Based on the plugin compatibility we can choose 7.9.x or 7.6.x.

We don't have resources to migrate all plugins now(immediately).

Best,  
TS

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [October 13, 2020, 4:47pm UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/4 "2020-10-13T16:47:53Z")

</div>

Hi @tsvet. You might consider joining the [Elastic Community Slack](https://www.elastic.co/blog/join-our-elastic-stack-workspace-on-slack) to ask your specific questions. The Slack group has Elastic employees as well as other community plugin authors who may be able to assist you.

---

<div class="post-metadata">

**Author:** ![tsvet](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tsvet](https://discuss.elastic.co/u/tsvet)\
**Post date:** [October 14, 2020, 6:50am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/5 "2020-10-14T06:50:34Z")

</div>

thanks a lot @nickpeihl

---

<div class="post-metadata">

**Author:** ![Pierre\_Gayvallet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_gayvallet/32/77239_2.png) [@Pierre\_Gayvallet](https://discuss.elastic.co/u/Pierre_Gayvallet)\
**Post date:** [October 15, 2020, 8:08am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/6 "2020-10-15T08:08:51Z")

</div>

Legacy platform support is dropped in 7.10. Your legacy plugin may still works in 7.9, but it mostly depends on the platform / plugin APIs it was consuming, as some legacy APIs were already dropped in 7.9. I would just start a new instance with your legacy plugins to see if it works properly.

---

<div class="post-metadata">

**Author:** ![tsvet](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tsvet](https://discuss.elastic.co/u/tsvet)\
**Post date:** [October 18, 2020, 8:18am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/7 "2020-10-18T08:18:24Z")

</div>

thanks a lot @Pierre_Gayvallet let us give it a try .. but we have many plugins .. it is going to take some time

---

<div class="post-metadata">

**Author:** ![tsvet](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tsvet](https://discuss.elastic.co/u/tsvet)\
**Post date:** [October 18, 2020, 8:23am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/8 "2020-10-18T08:23:37Z")

</div>

@Pierre_Gayvallet so if we wanna use the legacy architecture we need 7.8, right?

---

<div class="post-metadata">

**Author:** ![Pierre\_Gayvallet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_gayvallet/32/77239_2.png) [@Pierre\_Gayvallet](https://discuss.elastic.co/u/Pierre_Gayvallet)\
**Post date:** [November 3, 2020, 7:43am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/9 "2020-11-03T07:43:39Z")

</div>

Sorry for the late answer. Yea, to keep using legacy plugins, 7.8 would probably be the recommended version

---

<div class="post-metadata">

**Author:** ![tsvet](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tsvet](https://discuss.elastic.co/u/tsvet)\
**Post date:** [November 3, 2020, 11:32am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/10 "2020-11-03T11:32:53Z")

</div>

@Pierre_Gayvallet Unfortunately no luck with using legacy plugins on 7.9.x .. We would like to use 7.9.3

---

<div class="post-metadata">

**Author:** ![Pierre\_Gayvallet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_gayvallet/32/77239_2.png) [@Pierre\_Gayvallet](https://discuss.elastic.co/u/Pierre_Gayvallet)\
**Post date:** [November 6, 2020, 9:49pm UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/11 "2020-11-06T21:49:27Z")

</div>

What kind of errors are you encountering when using the legacy plugins against a 7.9.3 build?

---

<div class="post-metadata">

**Author:** ![tsvet](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tsvet](https://discuss.elastic.co/u/tsvet)\
**Post date:** [November 9, 2020, 7:46am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/12 "2020-11-09T07:46:19Z")

</div>

We are still using the old legacy architecture and we can not register the visualiations. We have different kind of custom plugins (visualizations, navbar extensions and applications). With Applications - all good but with navbar extensions and visualization - no luck.  
@Pierre_Gayvallet I saw a comment from @Mikhail_Shustov and would like to give it a try with the hacks.js approach -

 ![Screen Shot 2020-11-09 at 10.15.47 AM](https://us1.discourse-cdn.com/elastic/original/3X/f/2/f2c84841c28d9054d2660420711889c6b37175bc.png) [Debugging missing plugins after updating from 7.6.2 to 7.9.2](https://discuss.elastic.co/t/debugging-missing-plugins-after-updating-from-7-6-2-to-7-9-2/252355/4) . I know that we should use the new platform way of developing but we have many plugins and we dont have that many resources to do the migration immediately. Any hints on registering visType visualization with legacy architecture on kibana 7.9.3 will be much appreciated

---

<div class="post-metadata">

**Author:** ![Pierre\_Gayvallet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_gayvallet/32/77239_2.png) [@Pierre\_Gayvallet](https://discuss.elastic.co/u/Pierre_Gayvallet)\
**Post date:** [November 9, 2020, 8:52am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/13 "2020-11-09T08:52:22Z")

</div>

Yea, after giving it a quick look, I can confirm, unfortunately. Vizualisation migrated during 7.9, so it is no longer possible to register vis using the legacy API in 7.9.

The hack Mikhail suggested seems like the only option. The `ui/new_platform` module (`src/legacy/ui/public/new_platform` for the full path) is the bridge we have been using to access KP apis from legacy plugins during the migration period. You should be able to use it to use the KP `vizualisation` plugin from your legacy plugin and registering the `vis` using it.

---

<div class="post-metadata">

**Author:** ![tsvet](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tsvet](https://discuss.elastic.co/u/tsvet)\
**Post date:** [November 10, 2020, 6:45am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/14 "2020-11-10T06:45:14Z")

</div>

@Pierre_Gayvallet apologies for disturbing you that much but if I wanna use this hack with `ui/new_platform` module .. Is there a requirement that my plugin should be written in typescript ?  
I am getting this error after trying to register the plugin by using  
import { npSetup } from '../../src/legacy/ui/public/new\_platform';  
npSetup.plugins.visualizations.createBaseVisualization({  
name: '...',  
title: '..',  
});  
it is an angular plugin. thanks a lot

---

<div class="post-metadata">

**Author:** ![Pierre\_Gayvallet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_gayvallet/32/77239_2.png) [@Pierre\_Gayvallet](https://discuss.elastic.co/u/Pierre_Gayvallet)\
**Post date:** [November 10, 2020, 7:29am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/15 "2020-11-10T07:29:55Z")

</div>

No, typescript is not an obligation. Javascript should work just fine.

Where are you trying to import `ui/new_platform` from? This can't be imported from server-side code (which I'm guessing is what you are doing?). You need to declare a `uiExports.hacks` section in your plugin descriptor (these are the files that will be executed on the client-side)

See [https://github.com/elastic/kibana/blob/7.8/x-pack/legacy/plugins/security/index.ts#L51](https://github.com/elastic/kibana/blob/7.8/x-pack/legacy/plugins/security/index.ts#L51).

```auto
    uiExports: {
      hacks: ['plugins/security/hacks/legacy'],

```

You should then be able to properly import `npSetup` from here. See [https://github.com/elastic/kibana/blob/7.8/x-pack/legacy/plugins/security/public/hacks/legacy.ts](https://github.com/elastic/kibana/blob/7.8/x-pack/legacy/plugins/security/public/hacks/legacy.ts) for example.

---

<div class="post-metadata">

**Author:** ![tsvet](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tsvet](https://discuss.elastic.co/u/tsvet)\
**Post date:** [November 11, 2020, 1:02pm UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/16 "2020-11-11T13:02:57Z")

</div>

> [@tsvet](#):
>
> npSetup.plugins.visualizations.createBaseVisualization({  
> name: '...',  
> title: '..',  
> });

thanks I will give it a try tomorrow

---

<div class="post-metadata">

**Author:** ![tsvet](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tsvet](https://discuss.elastic.co/u/tsvet)\
**Post date:** [November 15, 2020, 5:51pm UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/17 "2020-11-15T17:51:18Z")

</div>

Hi @Pierre_Gayvallet still no luck.  
This is an old plugin. Angular based. It was fine up to 7.3.2.  
This is our structure.

 ![Screen Shot 2020-11-15 at 9.48.27 PM](https://us1.discourse-cdn.com/elastic/original/3X/a/f/af5176754a356779a8ac47d1c546e12bdc010e54.png)  
 ![Screen Shot 2020-11-15 at 6.00.42 PM](https://us1.discourse-cdn.com/elastic/original/3X/1/0/104ea02caa5cf5818a8d443cd03bdda8dd086add.png)  
Not sure how to apply the legacy hack:  
 ![Screen Shot 2020-11-15 at 6.01.05 PM](https://us1.discourse-cdn.com/elastic/original/3X/4/5/45961f58289c0246dee10d9baa25c124b731a240.png)

---

<div class="post-metadata">

**Author:** ![tsvet](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tsvet](https://discuss.elastic.co/u/tsvet)\
**Post date:** [November 15, 2020, 6:35pm UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/18 "2020-11-15T18:35:11Z")

</div>

most probably I should surrender and accept the we need to refactor old architecture to new platform 😆

---

<div class="post-metadata">

**Author:** ![Pierre\_Gayvallet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_gayvallet/32/77239_2.png) [@Pierre\_Gayvallet](https://discuss.elastic.co/u/Pierre_Gayvallet)\
**Post date:** [November 19, 2020, 10:45am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/19 "2020-11-19T10:45:24Z")

</div>

> most probably I should surrender and accept the we need to refactor old architecture to new platform

That would probably be the best solution for mid/long term to be honest, as you will have to do it at some point if you want to follow Kibana releases anyway.

Now, to try to help on this specific issue:

Is the hack file actually loaded? Do you see your `console.log` in the browser dev tools?

If that's the case, then it's probably an issue regarding how you use the `visualizations` plugin API. unfortunately, I lack knowledge of this part of our code (and these APIs were moving quite fast during the `7.9` minors.

The app team would be best suited for this part. CC @flash1293

---

<div class="post-metadata">

**Author:** ![tsvet](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tsvet](https://discuss.elastic.co/u/tsvet)\
**Post date:** [November 26, 2020, 7:53am UTC](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741/20 "2020-11-26T07:53:24Z")

</div>

@Pierre_Gayvallet thanks again .. We have been working on upgrading Apps now(with apps we have some success).. Now we are trying again on visualizations. Will keep you updated..

[Next page](https://discuss.elastic.co/t/kibana-development-migrate-upgrade-plugins-from-7-3-x-to-7-9-x/251741.md?page=2)
