forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor KibanaMigrator, improve readability, maintainability and UT (e…
…lastic#155693) Addresses the following feedback: elastic#154151 (comment) Similar to what has been done for ZDT, the goal of this PR is to extract the logic of the `runV2Migration()` from the `KibanaMigrator` into a separate file. The PR also fixes some incomplete / incorrect UTs and adds a few missing ones. (cherry picked from commit 06c337f) # Conflicts: # packages/core/saved-objects/core-saved-objects-migration-server-internal/src/kibana_migrator.test.ts # packages/core/saved-objects/core-saved-objects-migration-server-internal/src/kibana_migrator.ts # packages/core/saved-objects/core-saved-objects-migration-server-internal/src/run_resilient_migrator.ts # src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.ts
- Loading branch information
1 parent
21beb7d
commit 1dc4f9d
Showing
19 changed files
with
971 additions
and
673 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
116 changes: 116 additions & 0 deletions
116
packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.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,116 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
import { IndexTypesMap } from './mappings'; | ||
|
||
/** | ||
* This map holds the default breakdown of SO types per index (pre 8.8.0) | ||
*/ | ||
export const DEFAULT_INDEX_TYPES_MAP: IndexTypesMap = { | ||
'.kibana_task_manager': ['task'], | ||
'.kibana': [ | ||
'action', | ||
'action_task_params', | ||
'alert', | ||
'api_key_pending_invalidation', | ||
'apm-indices', | ||
'apm-server-schema', | ||
'apm-service-group', | ||
'apm-telemetry', | ||
'app_search_telemetry', | ||
'application_usage_daily', | ||
'application_usage_totals', | ||
'book', | ||
'canvas-element', | ||
'canvas-workpad', | ||
'canvas-workpad-template', | ||
'cases', | ||
'cases-comments', | ||
'cases-configure', | ||
'cases-connector-mappings', | ||
'cases-telemetry', | ||
'cases-user-actions', | ||
'config', | ||
'config-global', | ||
'connector_token', | ||
'core-usage-stats', | ||
'csp-rule-template', | ||
'dashboard', | ||
'endpoint:user-artifact-manifest', | ||
'enterprise_search_telemetry', | ||
'epm-packages', | ||
'epm-packages-assets', | ||
'event_loop_delays_daily', | ||
'exception-list', | ||
'exception-list-agnostic', | ||
'file', | ||
'file-upload-usage-collection-telemetry', | ||
'fileShare', | ||
'fleet-fleet-server-host', | ||
'fleet-message-signing-keys', | ||
'fleet-preconfiguration-deletion-record', | ||
'fleet-proxy', | ||
'graph-workspace', | ||
'guided-onboarding-guide-state', | ||
'guided-onboarding-plugin-state', | ||
'index-pattern', | ||
'infrastructure-monitoring-log-view', | ||
'infrastructure-ui-source', | ||
'ingest-agent-policies', | ||
'ingest-download-sources', | ||
'ingest-outputs', | ||
'ingest-package-policies', | ||
'ingest_manager_settings', | ||
'inventory-view', | ||
'kql-telemetry', | ||
'legacy-url-alias', | ||
'lens', | ||
'lens-ui-telemetry', | ||
'map', | ||
'metrics-explorer-view', | ||
'ml-job', | ||
'ml-module', | ||
'ml-trained-model', | ||
'monitoring-telemetry', | ||
'osquery-manager-usage-metric', | ||
'osquery-pack', | ||
'osquery-pack-asset', | ||
'osquery-saved-query', | ||
'query', | ||
'rules-settings', | ||
'sample-data-telemetry', | ||
'search', | ||
'search-session', | ||
'search-telemetry', | ||
'searchableList', | ||
'security-rule', | ||
'security-solution-signals-migration', | ||
'siem-detection-engine-rule-actions', | ||
'siem-ui-timeline', | ||
'siem-ui-timeline-note', | ||
'siem-ui-timeline-pinned-event', | ||
'slo', | ||
'space', | ||
'spaces-usage-stats', | ||
'synthetics-monitor', | ||
'synthetics-param', | ||
'synthetics-privates-locations', | ||
'tag', | ||
'telemetry', | ||
'todo', | ||
'ui-metric', | ||
'upgrade-assistant-ml-upgrade-operation', | ||
'upgrade-assistant-reindex-operation', | ||
'uptime-dynamic-settings', | ||
'uptime-synthetics-api-key', | ||
'url', | ||
'usage-counters', | ||
'visualization', | ||
'workplace_search_telemetry', | ||
], | ||
}; |
Oops, something went wrong.