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

Use modelVersions instead of hashes to track changes in SO types #176803

Merged

Conversation

gsoldevila
Copy link
Contributor

@gsoldevila gsoldevila commented Feb 13, 2024

Summary

Address #169734 .

We're currently storing information about Saved Object types in the <index>.mapping._meta.
More specifically, we're storing hashes of the mappings of each type, under the migrationMappingPropertyHashes property.
This allows us to detect which types' mappings have changed, in order to update and pick up changes only for those types.

The problem is that md5 cannot be used if we want to be FIPS compliant.

Thus, the idea is to stop using hashes to track changes in the SO mappings.
Instead, we're going to use the same modelVersions introduced by ZDT:

Whenever mappings change for a given SO type, the corresponding modelVersion will change too, so modelVersions can be used to determine if mappings have changed.

@gsoldevila gsoldevila added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Feb 13, 2024
@gsoldevila gsoldevila self-assigned this Feb 13, 2024
@gsoldevila gsoldevila marked this pull request as ready for review February 14, 2024 18:29
@gsoldevila gsoldevila requested a review from a team as a code owner February 14, 2024 18:29
Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall approach makes sense to me to facilitate the transition away from md5 hashes. I left a few comments!

Comment on lines 76 to 79
migrationMappingPropertyHashes: {
foo: 'someLongHash',
bar: 'anotherLongHash',
baz: '10.3.0', // hashes and versions will NOT coexist (it's either one or the other)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it's a little funky that migrationMappingPropertyHashes will no longer contain hashes, but doesn't seem worth the upheaval of changing it and seems like something we need to keep bwc support for anyway.

Don't have a good solution in mind right now other than tracking it for later and adding a comment on wherever this type is defined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about it, I think I'll switch to the same property names used on ZDT algorithm: appVersions and docVersions. This way, I will not impact the existing hashes field (which will simply be deprecated).

I believe the advantages of doing this are worth it:

  • We will not be reusing a property with an outdated / misleading name.
  • We will align with the _meta stored by the ZDT algorithm, which could, in the future, facilitate transition from Cloud to Serverless.
  • If a migration fails or Kibana fails to start after a migration, and a rollback is performed, the previous version using hashes will still have the hashes field in place. This will prevent the migration logic from picking up ALL types (this could be a costly operation for large customers).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand this correctly: we need to know for sure that this map correctly reflects hashes for the previous 8.x release in order to know we will have "hits" for this md5 hashes. For non-stack releases, to my knowledge this is only serverless, we accept that this static map may have misses? Am I following correctly 😄

If that's true I'd consider naming this file something like 8_13_0_hash_to_version_map.json since that is the last stack version where we will be storing hashes in migrationMappingPropertyHashes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: might be worth adding a README.md explaining the purpose/reason of this file (transitioning off of md5)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree to both comments!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For non-stack releases, to my knowledge this is only serverless, we accept that this static map may have misses?

On serverless we use the ZDT algorithm, which uses the mappingVersions and docVersions instead of the migrationMappingPropertyHashes, so this change only impacts cloud and on prem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: might be worth adding a README.md explaining the purpose/reason of this file (transitioning off of md5)

Added a description (now a const instead of a JSON file).

Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few NITs and questions, but the approach looks fine to me

Comment on lines 1451 to 1465
const updatedRootFields = left.updatedTypes.filter((field) => rootFields.includes(field));
const updatedTypesQuery = Option.fromNullable(buildPickupMappingsQuery(left.updatedTypes));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asking as I'm not sure anymore: Could left.updatedHashes contain root fields (e.g namespace and so on) in addition to types previously, and did that change in that PR in left.updatedTypes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The modelVersion logic is currently not including the root fields, so with the PR we're not storing model versions for them in the _meta.

I have an update on the pipes to preserve existing behavior, and what I propose is to deep compare the mappings objects for the root fields (which are pretty simple). This way, the updated types will handle comparison of SO types through their modelVersions and comparison of root fields through deep compare of their mappings.
It will emit 2 different Left responses depending on which of them has changed (root_fields_changed vs types_changed), which in turn will simplify the logic in model.ts.

WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me

}

// If something exists in actual, but is missing in expected, we don't
// care, as it could be a disabled plugin, etc, and keeping stale stuff
// around is better than migrating unecessesarily.
function findChangedProp(actual: any, expected: any) {
return Object.keys(expected).find((k) => actual[k] !== expected[k]);
function findChangedProp(actual: any, expected: any, hashToVersionMap: Record<string, string>) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: I know this was there already, but can somehow use something more precise than any for those parameters?

@@ -39,11 +39,12 @@ import { DocumentMigrator } from './document_migrator';
import { runZeroDowntimeMigration } from './zdt';
import { ALLOWED_CONVERT_VERSION } from './kibana_migrator_constants';
import { runV2Migration } from './run_v2_migration';

import * as HASH_TO_VERSION_MAP from './hash_to_version_map.json';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: why is the import * as XXX required here compared to import XXX from ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was not apparently. I have moved it to constants.ts on @kbn/core-saved-objects-base-server-internal.

export interface KibanaMigratorOptions {
client: ElasticsearchClient;
typeRegistry: ISavedObjectTypeRegistry;
defaultIndexTypesMap: IndexTypesMap;
hashToVersionMap?: Record<string, string>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: I see it defaults to HASH_TO_VERSION_MAP, but I think I'd still rather have the new parameter not optional, wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me, we'll be more consistent with similar params that are being passed 👌🏼

}

// If something exists in actual, but is missing in expected, we don't
// care, as it could be a disabled plugin, etc, and keeping stale stuff
// around is better than migrating unecessesarily.
function findChangedProp(actual: any, expected: any) {
return Object.keys(expected).find((k) => actual[k] !== expected[k]);
function findChangedProp(actual: any, expected: any, hashToVersionMap: Record<string, string>) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to tighten the types and remove any?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(now part of diff_mappings.ts)
Fixed in the latest updates

interface HashToVersionMapParams {
type: string;
indexHashOrVersion: string;
appVersion: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When a type's metadata isn't available in the index actual[type] will be undefined so indexHashOrVersion could also be undefined.

Copy link
Contributor Author

@gsoldevila gsoldevila Mar 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Now part of compare_mappings.ts)

Correct, this has been made optional in the latest updates.

appVersion,
hashToVersionMap,
}: HashToVersionMapParams): boolean {
const indexEquivalentVersion = hashToVersionMap[`${type}|${indexHashOrVersion}`];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

${type}|${indexHashOrVersion} can type ever be undefined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Now part of compare_mappings.ts)

type cannot be undefined, as we loop through the different types from the registry.

On the other hand, indexHashOrVersion could be undefined (e.g. if it is a new type).
In this scenario, searching for type|undefined in the map would yield no results, and thus that type would be considered as updated.

@gsoldevila gsoldevila force-pushed the kbn-169734-fips-compliant-migrations branch 7 times, most recently from db3ff4c to 8cb7af1 Compare March 7, 2024 10:29
@gsoldevila gsoldevila force-pushed the kbn-169734-fips-compliant-migrations branch 2 times, most recently from 4223d6a to 99d8ea8 Compare March 8, 2024 09:09
Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gsoldevila gsoldevila force-pushed the kbn-169734-fips-compliant-migrations branch 2 times, most recently from b4eebbf to cd0e33f Compare March 18, 2024 08:53
@gsoldevila gsoldevila force-pushed the kbn-169734-fips-compliant-migrations branch from 8ca46c7 to 05fa106 Compare March 25, 2024 09:17
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/core-saved-objects-base-server-internal 71 180 +109
@kbn/core-saved-objects-migration-server-internal 94 96 +2
total +111

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/core-saved-objects-base-server-internal 10 11 +1
Unknown metric groups

API count

id before after diff
@kbn/core-saved-objects-base-server-internal 112 223 +111
@kbn/core-saved-objects-migration-server-internal 129 131 +2
total +113

References to deprecated APIs

id before after diff
@kbn/core-saved-objects-base-server-internal 18 23 +5

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @gsoldevila

Copy link
Contributor

@rudolf rudolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work

@gsoldevila gsoldevila merged commit 2f5396c into elastic:main Mar 25, 2024
17 checks passed
gsoldevila added a commit that referenced this pull request May 15, 2024
## Summary

Follow-up of #176803

Now that `8.14` has been branched and it is about to be released, we can
remove the test that ensures the `HASH_TO_VERSION_MAP` is aligned.

This PR also rolls back a few changes on the map that shouldn't have
been performed, as they belong to `8.15.0`.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 6, 2024
## Summary

Follow-up of elastic#176803

Now that `8.14` has been branched and it is about to be released, we can
remove the test that ensures the `HASH_TO_VERSION_MAP` is aligned.

This PR also rolls back a few changes on the map that shouldn't have
been performed, as they belong to `8.15.0`.

(cherry picked from commit ed2e59f)
kibanamachine added a commit that referenced this pull request Jun 6, 2024
# Backport

This will backport the following commits from `main` to `8.14`:
- [Kbn 176803 cleanup 8.14 md5 check
(#183416)](#183416)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-05-15T09:37:42Z","message":"Kbn
176803 cleanup 8.14 md5 check (#183416)\n\n## Summary\r\n\r\nFollow-up
of #176803\r\n\r\nNow that `8.14` has been branched and it is about to
be released, we can\r\nremove the test that ensures the
`HASH_TO_VERSION_MAP` is aligned.\r\n\r\nThis PR also rolls back a few
changes on the map that shouldn't have\r\nbeen performed, as they belong
to
`8.15.0`.","sha":"ed2e59fea95b39dcc853f948ce122544515370f0","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","backport:prev-minor","Feature:FIPS","v8.15.0"],"title":"Kbn
176803 cleanup 8.14 md5
check","number":183416,"url":"https://github.com/elastic/kibana/pull/183416","mergeCommit":{"message":"Kbn
176803 cleanup 8.14 md5 check (#183416)\n\n## Summary\r\n\r\nFollow-up
of #176803\r\n\r\nNow that `8.14` has been branched and it is about to
be released, we can\r\nremove the test that ensures the
`HASH_TO_VERSION_MAP` is aligned.\r\n\r\nThis PR also rolls back a few
changes on the map that shouldn't have\r\nbeen performed, as they belong
to
`8.15.0`.","sha":"ed2e59fea95b39dcc853f948ce122544515370f0"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/183416","number":183416,"mergeCommit":{"message":"Kbn
176803 cleanup 8.14 md5 check (#183416)\n\n## Summary\r\n\r\nFollow-up
of #176803\r\n\r\nNow that `8.14` has been branched and it is about to
be released, we can\r\nremove the test that ensures the
`HASH_TO_VERSION_MAP` is aligned.\r\n\r\nThis PR also rolls back a few
changes on the map that shouldn't have\r\nbeen performed, as they belong
to `8.15.0`.","sha":"ed2e59fea95b39dcc853f948ce122544515370f0"}}]}]
BACKPORT-->

Co-authored-by: Gerard Soldevila <[email protected]>
gsoldevila added a commit that referenced this pull request Oct 24, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 24, 2024
## Summary

Addresses elastic/elastic-entity-model#70
Fixes regression introduced in
elastic#176803

(cherry picked from commit 8de3636)
kibanamachine added a commit that referenced this pull request Oct 24, 2024
…197573)

# Backport

This will backport the following commits from `main` to `8.16`:
- [Update mappings if/when new SO types are introduced
(#197061)](#197061)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-24T08:21:43Z","message":"Update
mappings if/when new SO types are introduced (#197061)\n\n##
Summary\r\n\r\nAddresses
https://github.com/elastic/elastic-entity-model/issues/70\r\nFixes
regression introduced
in\r\nhttps://github.com//pull/176803","sha":"8de3636e43be7c874b2c3457f1496a0fc31f224d","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Core","release_note:skip","v9.0.0","backport:prev-minor","backport:prev-major","v8.16.0","v8.15.3"],"title":"Update
mappings if/when new SO types are
introduced","number":197061,"url":"https://github.com/elastic/kibana/pull/197061","mergeCommit":{"message":"Update
mappings if/when new SO types are introduced (#197061)\n\n##
Summary\r\n\r\nAddresses
https://github.com/elastic/elastic-entity-model/issues/70\r\nFixes
regression introduced
in\r\nhttps://github.com//pull/176803","sha":"8de3636e43be7c874b2c3457f1496a0fc31f224d"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197061","number":197061,"mergeCommit":{"message":"Update
mappings if/when new SO types are introduced (#197061)\n\n##
Summary\r\n\r\nAddresses
https://github.com/elastic/elastic-entity-model/issues/70\r\nFixes
regression introduced
in\r\nhttps://github.com//pull/176803","sha":"8de3636e43be7c874b2c3457f1496a0fc31f224d"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Gerard Soldevila <[email protected]>
gsoldevila added a commit to gsoldevila/kibana that referenced this pull request Oct 24, 2024
## Summary

Addresses elastic/elastic-entity-model#70
Fixes regression introduced in
elastic#176803

(cherry picked from commit 8de3636)

# Conflicts:
#	src/core/server/integration_tests/saved_objects/migrations/group1/v2_migration.test.ts
#	src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kb_nodes.test.ts
#	src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.fixtures.ts
gsoldevila added a commit to gsoldevila/kibana that referenced this pull request Oct 24, 2024
## Summary

Addresses elastic/elastic-entity-model#70
Fixes regression introduced in
elastic#176803

(cherry picked from commit 8de3636)

# Conflicts:
#	src/core/server/integration_tests/saved_objects/migrations/group1/v2_migration.test.ts
gsoldevila added a commit that referenced this pull request Oct 24, 2024
…197598)

# Backport

This will backport the following commits from `main` to `8.15`:
- [Update mappings if/when new SO types are introduced
(#197061)](#197061)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-24T08:21:43Z","message":"Update
mappings if/when new SO types are introduced (#197061)\n\n##
Summary\r\n\r\nAddresses
https://github.com/elastic/elastic-entity-model/issues/70\r\nFixes
regression introduced
in\r\nhttps://github.com//pull/176803","sha":"8de3636e43be7c874b2c3457f1496a0fc31f224d","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Core","release_note:skip","v9.0.0","backport:prev-minor","backport:prev-major","v8.16.0","v8.15.3"],"number":197061,"url":"https://github.com/elastic/kibana/pull/197061","mergeCommit":{"message":"Update
mappings if/when new SO types are introduced (#197061)\n\n##
Summary\r\n\r\nAddresses
https://github.com/elastic/elastic-entity-model/issues/70\r\nFixes
regression introduced
in\r\nhttps://github.com//pull/176803","sha":"8de3636e43be7c874b2c3457f1496a0fc31f224d"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197061","number":197061,"mergeCommit":{"message":"Update
mappings if/when new SO types are introduced (#197061)\n\n##
Summary\r\n\r\nAddresses
https://github.com/elastic/elastic-entity-model/issues/70\r\nFixes
regression introduced
in\r\nhttps://github.com//pull/176803","sha":"8de3636e43be7c874b2c3457f1496a0fc31f224d"}},{"branch":"8.16","label":"v8.16.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/197573","number":197573,"state":"MERGED","mergeCommit":{"sha":"3687435cb4531b1a0470abf42f69a420e2041cd2","message":"[8.16]
Update mappings if/when new SO types are introduced (#197061)
(#197573)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.16`:\n- [Update mappings if/when new SO types are
introduced\n(#197061)](https://github.com/elastic/kibana/pull/197061)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Gerard\nSoldevila\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-10-24T08:21:43Z\",\"message\":\"Update\nmappings
if/when new SO types are introduced
(#197061)\\n\\n##\nSummary\\r\\n\\r\\nAddresses\nhttps://github.com/elastic/elastic-entity-model/issues/70\\r\\nFixes\nregression
introduced\nin\\r\\nhttps://github.com//pull/176803\",\"sha\":\"8de3636e43be7c874b2c3457f1496a0fc31f224d\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.17.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"bug\",\"Team:Core\",\"release_note:skip\",\"v9.0.0\",\"backport:prev-minor\",\"backport:prev-major\",\"v8.16.0\",\"v8.15.3\"],\"title\":\"Update\nmappings
if/when new SO types
are\nintroduced\",\"number\":197061,\"url\":\"https://github.com/elastic/kibana/pull/197061\",\"mergeCommit\":{\"message\":\"Update\nmappings
if/when new SO types are introduced
(#197061)\\n\\n##\nSummary\\r\\n\\r\\nAddresses\nhttps://github.com/elastic/elastic-entity-model/issues/70\\r\\nFixes\nregression
introduced\nin\\r\\nhttps://github.com//pull/176803\",\"sha\":\"8de3636e43be7c874b2c3457f1496a0fc31f224d\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.16\",\"8.15\"],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/197061\",\"number\":197061,\"mergeCommit\":{\"message\":\"Update\nmappings
if/when new SO types are introduced
(#197061)\\n\\n##\nSummary\\r\\n\\r\\nAddresses\nhttps://github.com/elastic/elastic-entity-model/issues/70\\r\\nFixes\nregression
introduced\nin\\r\\nhttps://github.com//pull/176803\",\"sha\":\"8de3636e43be7c874b2c3457f1496a0fc31f224d\"}},{\"branch\":\"8.16\",\"label\":\"v8.16.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"8.15\",\"label\":\"v8.15.3\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by:
Gerard Soldevila
<[email protected]>"}},{"branch":"8.15","label":"v8.15.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
gsoldevila added a commit that referenced this pull request Oct 24, 2024
…197597)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Update mappings if/when new SO types are introduced
(#197061)](#197061)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-24T08:21:43Z","message":"Update
mappings if/when new SO types are introduced (#197061)\n\n##
Summary\r\n\r\nAddresses
https://github.com/elastic/elastic-entity-model/issues/70\r\nFixes
regression introduced
in\r\nhttps://github.com//pull/176803","sha":"8de3636e43be7c874b2c3457f1496a0fc31f224d","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Core","release_note:skip","v9.0.0","backport:prev-minor","backport:prev-major","v8.16.0","v8.15.3"],"number":197061,"url":"https://github.com/elastic/kibana/pull/197061","mergeCommit":{"message":"Update
mappings if/when new SO types are introduced (#197061)\n\n##
Summary\r\n\r\nAddresses
https://github.com/elastic/elastic-entity-model/issues/70\r\nFixes
regression introduced
in\r\nhttps://github.com//pull/176803","sha":"8de3636e43be7c874b2c3457f1496a0fc31f224d"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197061","number":197061,"mergeCommit":{"message":"Update
mappings if/when new SO types are introduced (#197061)\n\n##
Summary\r\n\r\nAddresses
https://github.com/elastic/elastic-entity-model/issues/70\r\nFixes
regression introduced
in\r\nhttps://github.com//pull/176803","sha":"8de3636e43be7c874b2c3457f1496a0fc31f224d"}},{"branch":"8.16","label":"v8.16.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/197573","number":197573,"state":"MERGED","mergeCommit":{"sha":"3687435cb4531b1a0470abf42f69a420e2041cd2","message":"[8.16]
Update mappings if/when new SO types are introduced (#197061)
(#197573)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.16`:\n- [Update mappings if/when new SO types are
introduced\n(#197061)](https://github.com/elastic/kibana/pull/197061)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Gerard\nSoldevila\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-10-24T08:21:43Z\",\"message\":\"Update\nmappings
if/when new SO types are introduced
(#197061)\\n\\n##\nSummary\\r\\n\\r\\nAddresses\nhttps://github.com/elastic/elastic-entity-model/issues/70\\r\\nFixes\nregression
introduced\nin\\r\\nhttps://github.com//pull/176803\",\"sha\":\"8de3636e43be7c874b2c3457f1496a0fc31f224d\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.17.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"bug\",\"Team:Core\",\"release_note:skip\",\"v9.0.0\",\"backport:prev-minor\",\"backport:prev-major\",\"v8.16.0\",\"v8.15.3\"],\"title\":\"Update\nmappings
if/when new SO types
are\nintroduced\",\"number\":197061,\"url\":\"https://github.com/elastic/kibana/pull/197061\",\"mergeCommit\":{\"message\":\"Update\nmappings
if/when new SO types are introduced
(#197061)\\n\\n##\nSummary\\r\\n\\r\\nAddresses\nhttps://github.com/elastic/elastic-entity-model/issues/70\\r\\nFixes\nregression
introduced\nin\\r\\nhttps://github.com//pull/176803\",\"sha\":\"8de3636e43be7c874b2c3457f1496a0fc31f224d\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.16\",\"8.15\"],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/197061\",\"number\":197061,\"mergeCommit\":{\"message\":\"Update\nmappings
if/when new SO types are introduced
(#197061)\\n\\n##\nSummary\\r\\n\\r\\nAddresses\nhttps://github.com/elastic/elastic-entity-model/issues/70\\r\\nFixes\nregression
introduced\nin\\r\\nhttps://github.com//pull/176803\",\"sha\":\"8de3636e43be7c874b2c3457f1496a0fc31f224d\"}},{\"branch\":\"8.16\",\"label\":\"v8.16.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"8.15\",\"label\":\"v8.15.3\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by:
Gerard Soldevila
<[email protected]>"}},{"branch":"8.15","label":"v8.15.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.14 candidate backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants