elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.64k stars 8.23k forks source link

Kibana server is not restarting when during development of a server side plugin code #171260

Open mistic opened 1 year ago

mistic commented 1 year ago

Looks like when changing the server side code of an external plugin during development, Kiabana server is not restarting to reflect the changes. We should investigate and understand if we can act here.

elasticmachine commented 1 year ago

Pinging @elastic/kibana-operations (Team:Operations)

mickalpine commented 2 weeks ago

This is still an issue. I'm trying to develop an external plugin, running yarn dev --watch in the plugin folder works for the public content but the server side app requires me to manually restart kibana with yarn start

@mistic any chance we can get a bump on this?

mickalpine commented 2 weeks ago

The fix is fairly simple:

  1. Add the path of files that should trigger a server restart to:

https://github.com/elastic/kibana/blob/52264b7212554e64e72af6e348c36a20688b3fd3/packages/kbn-cli-dev-mode/src/watcher.ts#L29

  1. yarn kbn bootstrap
mickalpine commented 2 weeks ago

plugins/myPlugin/kibana.json should also trigger a dev server restart e.g. when adding to requiredPlugins/optionalPlugins

https://github.com/elastic/kibana/blob/52264b7212554e64e72af6e348c36a20688b3fd3/packages/kbn-cli-dev-mode/src/watcher.ts#L26-L30

https://github.com/elastic/kibana/blob/52264b7212554e64e72af6e348c36a20688b3fd3/packages/kbn-cli-dev-mode/src/watcher.ts#L92-L94