forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't migrate partial documents (elastic#198703)
## Summary Fixes a regression by adding back the functionality that was originally introduced in elastic#162404: skipping migrations (transform and forwardCompatibilitySchema) when the fields option is specified In working on this we uncovered some problem scenarios we previously hadn't thought through (will create separate issues for these): 1. Even if we can't reliably run the transform part of migrations on a partial document we should still run the `forwardCompatibilitySchema` so that unknown fields from future versions are dropped. However, we realised most teams missed the detail in our [docs](https://github.com/elastic/kibana/blob/main/docs/developer/architecture/core/saved-objects-service.asciidoc?plain=1#L429-L457) that call out that forwardCompatibilitySchemas shouldn't assert on data but only drop unknown fields. This means if we would run the forwardCompatibilitySchema today it would most often fail on partial documents. 3. When `fields` contain an encrypted field but not all AAD fields, encryption would fail and log an error (potentially triggering serverless alerts).
- Loading branch information
Showing
2 changed files
with
49 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters