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

Move index-pattern migration to kibana plugin #31644

Merged

Conversation

mikecote
Copy link
Contributor

This PR moves the index-pattern migration to the kibana plugin. This is needed to allow the new import / export api to work between environments that use different licenses. In general migrations and mappings should be paired together in the same plugin.

I came across the issue while writing the new import API. I exported sample data using the basic license and noticed it failed when using that file in oss mode. The new import API applies migrations and throws an error when the data is migrated to a newer version than the most current migration (in this scenario, undefined).

@mikecote mikecote added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.0.0 v7.2.0 labels Feb 20, 2019
@mikecote mikecote self-assigned this Feb 20, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

Copy link
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM! Thanks for the knowledge about keeping migrations and plugins in the same place. That's good to know for any future work where a licensed plugin may affect OSS saved objects.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@chrisdavies chrisdavies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. And don't forget maybe to open an issue about having migrations enforce that migrations for a property belong to the same plugin that defines the mappings for that property. That seems reasonable to me.

@mikecote
Copy link
Contributor Author

No problem @jen-huang, this was a new discovery at the same time. We're going to look at adding enforcements to prevent this in the future.

@mikecote
Copy link
Contributor Author

Thanks @chrisdavies, I have created #31694 to track that issue.

@mikecote mikecote merged commit 09336f7 into elastic:master Feb 21, 2019
mikecote added a commit to mikecote/kibana that referenced this pull request Feb 21, 2019
@mikecote mikecote added the non-issue Indicates to automation that a pull request should not appear in the release notes label Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-issue Indicates to automation that a pull request should not appear in the release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants