-
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
SavedObjects: Add migration script to ensure no empty IDs #146346
Comments
Pinging @elastic/kibana-core (Team:Core) |
Just my 2cts, but global migrations and Unless we think the risk of such ID-less document for our system is very high (e.g if such documents can be created by internal features and not only by external calls to our APIs and/or tampering with export files), I would restrain from implementing such 'core' migration. |
I agree that manually tampered documents should not be of our concerns (especially since there are already measures to ensure they are not created in recent versions). However, somehow, we managed to break Kibana by importing documents with empty IDs (#146345). Probably fixing that issue I linked is just enough for now. |
I think we all agree that fixing #146345 might just be enough. I'll go ahead and close this issue. Feel free to reopen it if there's something I missed. |
Related to #146345 and #120693.
#120693 added a validation so Saved Objects cannot be created without an ID. However, when upgrading from previous versions, we may keep those IDs empty. This may eventually break when exporting and importing the SOs.
We should create a migration script to ensure all migrated documents have an ID.
N.B.: Mind the references from other SOs.
The text was updated successfully, but these errors were encountered: