-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ZDT migration] support root field addition (#179595)
## Summary Fix #179258 Change the version compatibility and mapping generation (`checkVersionCompatibility` and `generateAdditiveMappingDiff`) of the ZDT migration algorithm to support the scenario were root fields are added (adding new fields to our base mappings)
- Loading branch information
1 parent
da69703
commit f89c3e0
Showing
11 changed files
with
514 additions
and
27 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
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
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
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
27 changes: 27 additions & 0 deletions
27
...ects-migration-server-internal/src/zdt/utils/generate_additive_mapping_diff.test.mocks.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
export const getBaseMappingsMock = jest.fn(); | ||
|
||
jest.doMock('../../core/build_active_mappings', () => { | ||
const actual = jest.requireActual('../../core/build_active_mappings'); | ||
return { | ||
...actual, | ||
getBaseMappings: getBaseMappingsMock, | ||
}; | ||
}); | ||
|
||
export const getUpdatedRootFieldsMock = jest.fn(); | ||
|
||
jest.doMock('../../core/compare_mappings', () => { | ||
const actual = jest.requireActual('../../core/compare_mappings'); | ||
return { | ||
...actual, | ||
getUpdatedRootFields: getUpdatedRootFieldsMock, | ||
}; | ||
}); |
Oops, something went wrong.