Skip to content
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

[Migrations v2] provide a failure_strategy hook in SO registry for migrations #100687

Closed
Bamieh opened this issue May 26, 2021 · 2 comments
Closed
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

Comments

@Bamieh
Copy link
Member

Bamieh commented May 26, 2021

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:

import { skipOnMigration } from 'src/core/server'

savedObjects.register({
  ...
  failure_strategy: skipOnMigrationFailiure
})
@Bamieh Bamieh added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label May 26, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@joshdover joshdover added the project:ResilientSavedObjectMigrations Reduce Kibana upgrade failures by making saved object migrations more resilient label Jun 16, 2021
@pgayvallet
Copy link
Contributor

with serverless migrations, and the fact that data transformations were significantly reduced, I don't think we would need this anymore, especially given it would only partially solve our problems (any type not optin for this behavior would still cause issues).

So I'll go ahead and close this, feel free to reopen if necessary

@pgayvallet pgayvallet closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants