saved object migrations should support embeddable migrations #84907
Labels
Feature:Saved Objects
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
The embeddable service would like to allow registrators to define migrations that persistor plugins should run on any embeddable state they store on behalf of the registrator.
See #67931 for a description of the problem and the terminology (note the design in the RFC wasn't implemented).
#74352 Implemented a solution to this problem, however, it required that migrations run on every version which is ineffective. For persistors to only migrate the embedded data when necessary, they need to know which migrations were added by registrators. However, new persistors can register new migrations any time during setup. So the registrator needs a way to get all migrations before migrations run, but after the setup lifecycle completes.
To enable this plugins should be able to specify a migrations function when registering their saved object type. This allows the plugin to lazily/dynamically create all the migrations they require just before the migrations run (which is one tick after the setup lifecycle).
The text was updated successfully, but these errors were encountered: