-
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
Move index-pattern migration to kibana plugin #31644
Move index-pattern migration to kibana plugin #31644
Conversation
Pinging @elastic/kibana-platform |
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! 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.
💚 Build Succeeded |
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.
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.
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. |
Thanks @chrisdavies, I have created #31694 to track that issue. |
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).