[Migrations v2] provide a failure_strategy hook in SO registry for migrations #100687
Labels
project:ResilientSavedObjectMigrations
Reduce Kibana upgrade failures by making saved object migrations more resilient
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Some saved objects registries are OK with dropping their documents if the mgirations failed. Like a few collectors SOs and tasks SOs.
Providing a
failure_strategy
to the migrations to be triggered when migrations fail to allow pluginis to specify what to do on faiilure. This might reduce the amount of friction when migrations fail and reduce the number of upgrade failures.One common strategy is to
skipOnMigrationFailiure
. We can provide a few helper functions to automatically do that on faliure.Other custom implementations in mind is ammending the doc and trying again or allowing to drop some objects but not others.
An example usage for the feature is something like this:
The text was updated successfully, but these errors were encountered: