-
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
[SO Migration] support migrating from "global" to "isolated" types #126191
Comments
Pinging @elastic/kibana-core (Team:Core) |
As a side note, depending on where we goes regarding zero downtime migrations, migrations that would be rewriting a SO document's ID may no longer be permitted. And I think switching from |
We would need to make sure we preserve references so that anything that pointed to the old If there's no references we could use the document splitting migration idea from #87900 |
Let me clarify: I'm talking about converting from
Actually no, we wouldn't need to rewrite the ID. The global global object previously existed outside of spaces and it didn't have a namespace prefix. It would need to be "split" into multiple new objects for each non-Default spacde. Example for a Kibana instance that the following spaces: Default, Alpha, and Bravo Before migration: After migration:
Since the object ID isn't changing in this case, we wouldn't need to do anything special to preserve references. |
Well, then FWIW I can say for sure that this is something that will not be supported for rolling upgrades (not that it necessarily matters). |
I'm going to close this - we did not receive any concrete requests for such conversion, and the implication for ZDT are complex. |
Some consumers may have "global" saved object types (
namespaceType: 'agnostic'
) that they would like to convert to an "isolated" type (namespaceType: 'single'
) to become space-aware.For example, as of Kibana 8.1, APM provides a saved object to persist APM indices settings, and they wanted to start allowing users to set this on a per-space basis in 8.2+. They had to write a custom on-start "migration" to do this: #126176, #126378
If other consumers find themselves in the same position in the future, we should consider adding Core-level support for this. It's not a very technically difficult thing to do, we just have to have a list of all existing spaces before the migration function is called. We already have prior art for "core"-defined migration functions which convert from "isolated" types to "share-capable" types (
namespaceType: 'multiple-isolated'
) -- seeconvertToMultiNamespaceTypeVersion
for more details.The text was updated successfully, but these errors were encountered: