don't merge mappings from source index #134809
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Migrations
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
In #70951 we added a function
disableUnknownTypeMappingFields
which would take a source index's mappings and the mappings calculated from all the registered saved object types and merge them in a special way: the mappings of any unknown type would be set todynamic: false, properties: {}
.This ensured that we could still reindex any unknown saved object types even though the top-level mappings of the .kibana index has
dynamic: strict
.For v7.x
In 7.x we only warn of unknown saved object types #105213 so we need to maintain this behaviour. However, it's only necessary to add mappings for unknown types, we don't need to merge in all the mappings from the source index as we do in https://github.com/elastic/kibana/blob/7.17/src/core/server/saved_objects/migrations/core/migration_context.ts#L172
This will help us avoid known issues where an upgrade fails because of problematic mappings in the source index.
For v8.x
In 8.x Kibana will refuse to start a migration when there are unknown saved object types #107678 We don't need any mappings from the source index, we should only be using the
targetMappings
calculated from the mappings of the registered saved object types so we can removedisableUnknownTypeMappingFields
completelyThe text was updated successfully, but these errors were encountered: