Migration: Separate legacy and index entrypoint#54124
Merged
flash1293 merged 12 commits intoelastic:masterfrom Jan 21, 2020
Merged
Migration: Separate legacy and index entrypoint#54124flash1293 merged 12 commits intoelastic:masterfrom
flash1293 merged 12 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
Member
|
@elasticmachine merge upstream |
kertal
reviewed
Jan 14, 2020
| import { DiscoverPlugin } from './plugin'; | ||
|
|
||
| // Core will be looking for this when loading our plugin in the new platform | ||
| export const plugin = (context: PluginInitializerContext) => { |
Member
There was a problem hiding this comment.
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
Contributor
Author
There was a problem hiding this comment.
You are completely right, changed that. A small thing, but will make final migration easier.
…3/kibana into migration/separate-legacy-index
2 tasks
Contributor
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
kertal
approved these changes
Jan 21, 2020
Member
kertal
left a comment
There was a problem hiding this comment.
Code LGTM 👍 , didn't test now.
flash1293
added a commit
that referenced
this pull request
Jan 21, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR separates the shim plugin initialization from the
indexmodule of the shimmed Kibana App plugins which also export types or utilities.If
index.tsboth 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 alegacyand anindexfile per shimmed plugin -legacyinitializes the shimmed plugin,indexjust re-exports static code.Additionally this PR switches to the NP
usageCollectionplugin to initialize the telemetry functions in thehomeplugin.