-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.9] [Migrations] Only pickup updated SO types when performing a com…
…patible migration (#159962) (#161010) # Backport This will backport the following commits from `main` to `8.9`: - [[Migrations] Only pickup updated SO types when performing a compatible migration (#159962)](#159962) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Gerard Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2023-06-30T14:40:40Z","message":"[Migrations] Only pickup updated SO types when performing a compatible migration (#159962)\n\n## Summary\r\n\r\nTackles the first improvement described in\r\nhttps://github.com//issues/160038.\r\n\r\nWhen \"picking up\" the updated mappings, we add a \"query\" in order to\r\nselect and update only the SO types that have been updated, compared to\r\nthe previous version.\r\n\r\nWe achieve this by comparing `migrationMappingPropertyHashes`; we\r\ncompare the hashes stored in the\r\n`<soIndex>.mapping._meta.migrationMappingPropertyHashes` against the\r\nones calculated from the definitions from the `typeRegistry`.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6f87e1d6960ee4ac48908c7bef75b00abca265cb","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","enhancement","release_note:skip","Feature:Migrations","backport:prev-minor","v8.9.0","v8.10.0"],"number":159962,"url":"https://github.com/elastic/kibana/pull/159962","mergeCommit":{"message":"[Migrations] Only pickup updated SO types when performing a compatible migration (#159962)\n\n## Summary\r\n\r\nTackles the first improvement described in\r\nhttps://github.com//issues/160038.\r\n\r\nWhen \"picking up\" the updated mappings, we add a \"query\" in order to\r\nselect and update only the SO types that have been updated, compared to\r\nthe previous version.\r\n\r\nWe achieve this by comparing `migrationMappingPropertyHashes`; we\r\ncompare the hashes stored in the\r\n`<soIndex>.mapping._meta.migrationMappingPropertyHashes` against the\r\nones calculated from the definitions from the `typeRegistry`.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6f87e1d6960ee4ac48908c7bef75b00abca265cb"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/159962","number":159962,"mergeCommit":{"message":"[Migrations] Only pickup updated SO types when performing a compatible migration (#159962)\n\n## Summary\r\n\r\nTackles the first improvement described in\r\nhttps://github.com//issues/160038.\r\n\r\nWhen \"picking up\" the updated mappings, we add a \"query\" in order to\r\nselect and update only the SO types that have been updated, compared to\r\nthe previous version.\r\n\r\nWe achieve this by comparing `migrationMappingPropertyHashes`; we\r\ncompare the hashes stored in the\r\n`<soIndex>.mapping._meta.migrationMappingPropertyHashes` against the\r\nones calculated from the definitions from the `typeRegistry`.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6f87e1d6960ee4ac48908c7bef75b00abca265cb"}}]}] BACKPORT--> Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
- Loading branch information
1 parent
f0ee8c0
commit 0fbb6ef
Showing
18 changed files
with
607 additions
and
129 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
Oops, something went wrong.