Skip to content

Commit 4dc3e16

Browse files
authored
[Entity Store][Fix] Turn reset index name into a pattern for transform upgrades (#241448)
## Summary We have discovered that when upgrading Entity Store, the transforms will upgrade without needing to re-enable Entity Store first. This means the reset index name will be included in their sources while it does not exist. This leads to a failure and results in stopped transforms. Turning the name into a pattern is a workaround. A full fix utilizing capability mechanism will soon be rolled out instead. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
1 parent 56c87ce commit 4dc3e16

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const getDefaultIndexes = (type: string) => {
7878
...(type === 'user' ? ['.entity_analytics.monitoring.users-default'] : []),
7979
'.asset-criticality.asset-criticality-default',
8080
'risk-score.risk-score-latest-default',
81-
`.entities.v1.reset.security_${type}_default`,
81+
`.entities.v1.reset.security_${type}_default*`,
8282
`.entities.v1.updates.security_${type}_default*`,
8383
];
8484
};

x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/utils/entity_utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const buildIndexPatternsByEngine = async (
4747
dataViewsService: DataViewsService
4848
) => {
4949
const patterns = await buildIndexPatterns(space, appClient, dataViewsService, entityType);
50-
patterns.push(getEntitiesResetIndexName(entityType, space));
50+
patterns.push(getEntitiesResetIndexName(entityType, space).concat('*'));
5151
patterns.push(...getEntityUpdatesIndexPatterns(space, entityType));
5252
return patterns;
5353
};

x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/entity_store/trial_license_complete_tier/entity_store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ export default ({ getService }: FtrProviderContext) => {
344344
'test-*',
345345
'.asset-criticality.asset-criticality-default',
346346
'risk-score.risk-score-latest-default',
347-
'.entities.v1.reset.security_host_default',
347+
'.entities.v1.reset.security_host_default*',
348348
'.entities.v1.updates.security_host_default*',
349349
],
350350
},

0 commit comments

Comments
 (0)