Open joshdover opened 4 years ago
Pinging @elastic/kibana-platform (Team:Platform)
We are migrating our plugin from Legacy to the new platform, we have the follwoing remarks : 1- The plugin-generator does not add package.json to the plugin in order to add dependencies only for the plugin, we are adding package.json manually 2- We are unable to buid the package, we use manual process to provide zip file then install on Kibana instance 3- We are unable to access kibana after plugin install, we got alway the following message
Definition of plugin "my_plugin" not found and may have failed to load.
Version: 7.8.0
Build: 31997
Error: Definition of plugin "my_plugin" not found and may have failed to load.
read@http://host_ip:5601/31997/bundles/core/core.entry.js:68:127592
_callee3$@http://host_ip:5601/31997/bundles/core/core.entry.js:26:88001
l@http://host_ip:5601/31997/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:969217
s/o._invoke</<@http://host_ip:5601/31997/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:968971
_/</e[t]@http://host_ip:5601/31997/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:969574
asyncGeneratorStep@http://host_ip:5601/31997/bundles/core/core.entry.js:26:83980
_next@http://host_ip:5601/31997/bundles/core/core.entry.js:26:84309
_asyncToGenerator/</<@http://host_ip:5601/31997/bundles/core/core.entry.js:26:84446
_asyncToGenerator/<@http://host_ip:5601/31997/bundles/core/core.entry.js:26:84203
createPluginInstance@http://host_ip:5601/31997/bundles/core/core.entry.js:26:88563
_callee$@http://host_ip:5601/31997/bundles/core/core.entry.js:26:86361
l@http://host_ip:5601/31997/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:969217
s/o._invoke</<@http://host_ip:5601/31997/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:968971
_/</e[t]@http://host_ip:5601/31997/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:969574
asyncGeneratorStep@http://host_ip:5601/31997/bundles/core/core.entry.js:26:83980
_next@http://host_ip:5601/31997/bundles/core/core.entry.js:26:84309
_asyncToGenerator/</<@http://host_ip:5601/31997/bundles/core/core.entry.js:26:84446
_asyncToGenerator/<@http://host_ip:5601/31997/bundles/core/core.entry.js:26:84203
setup@http://host_ip:5601/31997/bundles/core/core.entry.js:26:86637
_callee$@http://host_ip:5601/31997/bundles/core/core.entry.js:68:124192
l@http://host_ip:5601/31997/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:969217
s/o._invoke</<@http://host_ip:5601/31997/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:968971
_/</e[t]@http://host_ip:5601/31997/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:969574
asyncGeneratorStep@http://host_ip:5601/31997/bundles/core/core.entry.js:68:118938
_next@http://host_ip:5601/31997/bundles/core/core.entry.js:68:119267
@synapticiel we are aware of the issue, your three points are covered in #70426 and #70412
Thank you @pgayvallet for your feedback, I was looking for workarounds to test my POC
With our plan to remove support for legacy plugins in an upcoming minor version, we should ensure that the tooling is in place to support building and installing Kibana Platform plugins. While some things "work" today, there is no real supported workflow for getting a 3rd party plugin working in production.
Generating
The plugin-generator has already been updated. I do not expect any significant changes required here.
Building
Currently, there is no immediately obvious way to build a plugin for installation in a distributable Kibana. We need some way for developers to build their plugins, and at a minimum, we should support:
@kbn/optimizer
Previously, the
plugin-generator
would include a package.json script for building a zip archive by leveraging theplugin-helpers
package. This package handles most of these tasks already, except for the@kbn/optimizer
piece. We can probably add some steps to this package to make it suitable for what we need. Once that is in place, we should consider updatingplugin-generator
to include this script by default.63069
Installing
Currently, the only way to "install" a Platform plugin is by unpacking the plugin in the
plugins
directory. For legacy plugins, we have thekibana-plugin
CLI for installing and removing plugins. We should update for anything we need to support platform plugins, including a version check against thekibana.json
file. https://github.com/elastic/kibana/issues/56482Related:
70412
70426