Skip to content
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

Embeddable persistable state migration #80973

Closed
Dosant opened this issue Oct 19, 2020 · 5 comments
Closed

Embeddable persistable state migration #80973

Dosant opened this issue Oct 19, 2020 · 5 comments
Assignees
Labels
Feature:Embedding Embedding content via iFrame

Comments

@Dosant
Copy link
Contributor

Dosant commented Oct 19, 2020

In scope of #74352 we added .telemetry .extract and .inject functions to embeddable service which can take in any embeddable input and perform associated action on it.
Same set was added to dynamic actions of uiActionsEnhanced and drilldowns. All of those where connected together.

Similar to that approach we need to add a way to migrate persistable state on embeddable input. As phase 1 we need to at least add it on server side and run as part of SO migrations.


Needed for: #71409
Part of: #63358

@Dosant Dosant added Feature:Embedding Embedding content via iFrame Team:AppArch labels Oct 19, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@Dosant
Copy link
Contributor Author

Dosant commented Oct 19, 2020

The open question we have right now:

With migrate functionality we want to follow similar approach like we did with extract, inject and telemetry (#74352). This approach relies on a chain of registries and enhancement pattern:

migrate() on a drilldown -> registers in DynamicActionsRegistry on uiActionsEnhanced -> used in EmbeddableEnhanced (x-pack) -> enhances embeddable plugin in OSS -> can be invoked by EmbeddableStart['migrate'].

With current approach to invoke a migration chain on embeddable you'd call a function on EmbeddableStart.
But SO migrations have to be registered in SETUP phase.

So right now seems there is no way to connect plugin persistable state migration system we plan have and a SO migration that has to be registered in setup phase.

@ppisljar
Copy link
Member

we can register migrations in the setup phase even if specific migrations rely on start contract of another plugin, but migrations would need to run AFTER start phase of all plugins has finished (and those start contracts are actually available). In setup phase we would pass a promise of start services in (core.getStartServices())

@Dosant
Copy link
Contributor Author

Dosant commented Oct 30, 2020

As discussed on services sync:

We will expose inject, extract, migrate methods on plugins start and will assume it is called only AFTER setup and that every plugin already registered everything. Core runs migrations after all plugins finished their setup phase. No additional APIs or changes from platform are needed.

@Dosant
Copy link
Contributor Author

Dosant commented Nov 6, 2020

Closed by #82296

@Dosant Dosant closed this as completed Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Embedding Embedding content via iFrame
Projects
None yet
Development

No branches or pull requests

3 participants