-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration: Separate legacy and index entrypoint #54124
Migration: Separate legacy and index entrypoint #54124
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
import { DiscoverPlugin } from './plugin'; | ||
|
||
// Core will be looking for this when loading our plugin in the new platform | ||
export const plugin = (context: PluginInitializerContext) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a quick question: shouldn't plugin
stay in index.ts
be imported in legacy.ts? since "core will be looking for this when loading our plugin in the new platform". it that's the case index.ts would already be ready for NP, wouldn't it be?
however it's not a big change to be done when the cutover is done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are completely right, changed that. A small thing, but will make final migration easier.
…3/kibana into migration/separate-legacy-index
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM 👍 , didn't test now.
This PR separates the shim plugin initialization from the
index
module of the shimmed Kibana App plugins which also export types or utilities.If
index.ts
both initializes the plugin and re-exports static code, the whole plugin will always be initialized even if just a constant is used from the file (this is especially relevant in tests). This PR separates the two concerns by introducing alegacy
and anindex
file per shimmed plugin -legacy
initializes the shimmed plugin,index
just re-exports static code.Additionally this PR switches to the NP
usageCollection
plugin to initialize the telemetry functions in thehome
plugin.