[FTR - esArchiver] Update saved_object_api_integration archive to NOT delete SO indices (#161852)

## Summary

Part of https://github.com/elastic/kibana/issues/161882

Updates the
`x-pack/test/saved_object_api_integration/common/fixtures/es_archiver/saved_objects/spaces`
archive:
* deleting `mappings.json`
* updating documents in `data.json`

This way, _esArchiver_ will not delete SO indices and recreate them,
eliminating the odds of the related tests being flaky.

CC @jeramysoucy @dmlemeshko
This commit is contained in:
Gerard Soldevila 2023-07-17 11:27:48 +02:00 committed by GitHub
parent b2669d0b3c
commit 94a495fe1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 189 additions and 407 deletions

View file

@ -1,21 +1,3 @@
{
"type": "doc",
"value": {
"id": "space:default",
"index": ".kibana",
"source": {
"space": {
"_reserved": true,
"description": "This is the default space",
"name": "Default Space"
},
"type": "space",
"updated_at": "2017-09-21T18:49:16.270Z"
},
"type": "doc"
}
}
{
"type": "doc",
"value": {
@ -27,9 +9,10 @@
"name": "Space 1"
},
"type": "space",
"updated_at": "2017-09-21T18:49:16.270Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:49:16.270Z",
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "6.6.0"
}
}
}
@ -44,9 +27,10 @@
"name": "Space 2"
},
"type": "space",
"updated_at": "2017-09-21T18:49:16.270Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:49:16.270Z",
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "6.6.0"
}
}
}
@ -60,12 +44,14 @@
"timeFieldName": "@timestamp",
"title": "logstash-*"
},
"namespaces": ["default"],
"namespaces": [
"default"
],
"type": "index-pattern",
"migrationVersion": { "index-pattern": "8.0.0" },
"updated_at": "2017-09-21T18:49:16.270Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:49:16.270Z",
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.0.0"
}
}
}
@ -80,9 +66,13 @@
"defaultIndex": "defaultspace-index-pattern-id"
},
"type": "config",
"updated_at": "2017-09-21T18:49:16.302Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:49:16.302Z",
"namespaces": [
"default"
],
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.9.0"
}
}
}
@ -132,14 +122,16 @@
"timeRestore": true,
"timeTo": "Fri Sep 18 2015 12:24:38 GMT-0700",
"title": "Requests",
"uiStateJSON": "{}",
"version": 1
},
"namespaces": ["default"],
"namespaces": [
"default"
],
"type": "dashboard",
"updated_at": "2017-09-21T18:57:40.826Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:57:40.826Z",
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.0.0"
}
}
}
@ -153,12 +145,14 @@
"timeFieldName": "@timestamp",
"title": "logstash-*"
},
"namespaces": ["space_1"],
"namespaces": [
"space_1"
],
"type": "index-pattern",
"migrationVersion": { "index-pattern": "8.0.0" },
"updated_at": "2017-09-21T18:49:16.270Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:49:16.270Z",
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.0.0"
}
}
}
@ -174,9 +168,13 @@
},
"namespace": "space_1",
"type": "config",
"updated_at": "2017-09-21T18:49:16.302Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:49:16.302Z",
"namespaces": [
"space_1"
],
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.9.0"
}
}
}
@ -227,14 +225,16 @@
"timeRestore": true,
"timeTo": "Fri Sep 18 2015 12:24:38 GMT-0700",
"title": "Requests",
"uiStateJSON": "{}",
"version": 1
},
"namespaces": ["space_1"],
"namespaces": [
"space_1"
],
"type": "dashboard",
"updated_at": "2017-09-21T18:57:40.826Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:57:40.826Z",
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.0.0"
}
}
}
@ -248,12 +248,14 @@
"timeFieldName": "@timestamp",
"title": "logstash-*"
},
"namespaces": ["space_2"],
"namespaces": [
"space_2"
],
"type": "index-pattern",
"migrationVersion": { "index-pattern": "8.0.0" },
"updated_at": "2017-09-21T18:49:16.270Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:49:16.270Z",
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.0.0"
}
}
}
@ -269,9 +271,13 @@
},
"namespace": "space_2",
"type": "config",
"updated_at": "2017-09-21T18:49:16.302Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:49:16.302Z",
"namespaces": [
"space_2"
],
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.9.0"
}
}
}
@ -322,14 +328,16 @@
"timeRestore": true,
"timeTo": "Fri Sep 18 2015 12:24:38 GMT-0700",
"title": "Requests",
"uiStateJSON": "{}",
"version": 1
},
"namespaces": ["space_2"],
"namespaces": [
"space_2"
],
"type": "dashboard",
"updated_at": "2017-09-21T18:57:40.826Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:57:40.826Z",
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.0.0"
}
}
}
@ -359,7 +367,9 @@
"title": "A shared saved-object in all spaces"
},
"type": "sharedtype",
"namespaces": ["*"],
"namespaces": [
"*"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"
@ -376,7 +386,10 @@
"title": "A shared saved-object in the default and space_1 spaces"
},
"type": "sharedtype",
"namespaces": ["default", "space_1"],
"namespaces": [
"default",
"space_1"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"
@ -393,7 +406,9 @@
"title": "A shared saved-object only in space_1"
},
"type": "sharedtype",
"namespaces": ["space_1"],
"namespaces": [
"space_1"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"
@ -410,7 +425,9 @@
"title": "A shared saved-object only in space_2"
},
"type": "sharedtype",
"namespaces": ["space_2"],
"namespaces": [
"space_2"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"
@ -427,7 +444,11 @@
"title": "A shared saved-object in all spaces"
},
"type": "sharedtype",
"namespaces": ["default", "space_1", "space_2"],
"namespaces": [
"default",
"space_1",
"space_2"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"
@ -445,7 +466,11 @@
"title": "A shared saved-object in all spaces"
},
"type": "sharedtype",
"namespaces": ["default", "space_1", "space_2"],
"namespaces": [
"default",
"space_1",
"space_2"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"
@ -463,7 +488,11 @@
"title": "A shared saved-object in all spaces"
},
"type": "sharedtype",
"namespaces": ["default", "space_1", "space_2"],
"namespaces": [
"default",
"space_1",
"space_2"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"
@ -480,7 +509,11 @@
"title": "A shared saved-object in all spaces"
},
"type": "sharedtype",
"namespaces": ["default", "space_1", "space_2"],
"namespaces": [
"default",
"space_1",
"space_2"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"
@ -498,7 +531,11 @@
"title": "A shared saved-object in all spaces"
},
"type": "sharedtype",
"namespaces": ["default", "space_1", "space_2"],
"namespaces": [
"default",
"space_1",
"space_2"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"
@ -516,7 +553,11 @@
"resolvetype": {
"title": "Resolve outcome exactMatch"
},
"namespaces": ["default", "space_1", "space_2"]
"namespaces": [
"default",
"space_1",
"space_2"
]
}
}
}
@ -532,7 +573,11 @@
"resolvetype": {
"title": "Resolve outcome aliasMatch"
},
"namespaces": ["default", "space_1", "space_2"]
"namespaces": [
"default",
"space_1",
"space_2"
]
}
}
}
@ -550,7 +595,9 @@
"targetNamespace": "default",
"targetType": "resolvetype",
"targetId": "alias-match-newid"
}
},
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.2.0"
}
}
}
@ -568,7 +615,9 @@
"targetNamespace": "space_1",
"targetType": "resolvetype",
"targetId": "alias-match-newid"
}
},
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.2.0"
}
}
}
@ -584,7 +633,9 @@
"resolvetype": {
"title": "This is used to test that 1. the 'disabled' alias does not resolve to this target (because the alias is disabled), and 2. when this object that exists in all spaces is deleted, the alias that targets it is deleted too (even though the alias is disabled)"
},
"namespaces": ["*"]
"namespaces": [
"*"
]
}
}
}
@ -603,7 +654,9 @@
"targetType": "resolvetype",
"targetId": "disabled-newid",
"disabled": true
}
},
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.2.0"
}
}
}
@ -622,7 +675,9 @@
"targetType": "resolvetype",
"targetId": "disabled-newid",
"disabled": true
}
},
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.2.0"
}
}
}
@ -640,7 +695,9 @@
"targetNamespace": "space_x",
"targetType": "resolvetype",
"targetId": "alias-match-newid"
}
},
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.2.0"
}
}
}
@ -659,7 +716,9 @@
"targetType": "resolvetype",
"targetId": "alias-match-newid",
"disabled": true
}
},
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.2.0"
}
}
}
@ -675,7 +734,11 @@
"resolvetype": {
"title": "Resolve outcome conflict (1 of 2)"
},
"namespaces": ["default", "space_1", "space_2"]
"namespaces": [
"default",
"space_1",
"space_2"
]
}
}
}
@ -691,7 +754,11 @@
"resolvetype": {
"title": "Resolve outcome conflict (2 of 2)"
},
"namespaces": ["default", "space_1", "space_2"]
"namespaces": [
"default",
"space_1",
"space_2"
]
}
}
}
@ -709,7 +776,9 @@
"targetNamespace": "default",
"targetType": "resolvetype",
"targetId": "conflict-newid"
}
},
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.2.0"
}
}
}
@ -727,7 +796,9 @@
"targetNamespace": "space_1",
"targetType": "resolvetype",
"targetId": "conflict-newid"
}
},
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.2.0"
}
}
}
@ -742,7 +813,9 @@
"title": "A share-capable (isolated) saved-object only in the default space"
},
"type": "sharecapabletype",
"namespaces": ["default"],
"namespaces": [
"default"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"
@ -759,7 +832,9 @@
"title": "A share-capable (isolated) saved-object only in space_1"
},
"type": "sharecapabletype",
"namespaces": ["space_1"],
"namespaces": [
"space_1"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"
@ -776,12 +851,14 @@
"index-pattern": {
"title": "This is used to test if an imported object with a reference to this originId will be remapped properly"
},
"namespaces": ["*"],
"namespaces": [
"*"
],
"type": "index-pattern",
"migrationVersion": { "index-pattern": "8.0.0" },
"updated_at": "2017-09-21T18:49:16.270Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:49:16.270Z",
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.0.0"
}
}
}
@ -795,12 +872,14 @@
"index-pattern": {
"title": "This is used to test if an imported object with a reference to this originId will *not* be remapped"
},
"namespaces": ["*"],
"namespaces": [
"*"
],
"type": "index-pattern",
"migrationVersion": { "index-pattern": "8.0.0" },
"updated_at": "2017-09-21T18:49:16.270Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:49:16.270Z",
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.0.0"
}
}
}
@ -814,12 +893,14 @@
"index-pattern": {
"title": "This is used to test if an imported object with a reference to this originId will *not* be remapped"
},
"namespaces": ["*"],
"namespaces": [
"*"
],
"type": "index-pattern",
"migrationVersion": { "index-pattern": "8.0.0" },
"updated_at": "2017-09-21T18:49:16.270Z"
},
"type": "doc"
"updated_at": "2017-09-21T18:49:16.270Z",
"coreMigrationVersion": "8.8.0",
"typeMigrationVersion": "8.0.0"
}
}
}
@ -833,7 +914,9 @@
"title": "This is used to test if an imported object with a missing reference will have an exact match conflict when the missing reference is replaced"
},
"type": "sharedtype",
"namespaces": ["*"],
"namespaces": [
"*"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"
@ -851,7 +934,9 @@
"title": "This is used to test if an imported object with a missing reference will have an inexact match conflict when the missing reference is replaced"
},
"type": "sharedtype",
"namespaces": ["*"],
"namespaces": [
"*"
],
"updated_at": "2017-09-21T18:59:16.270Z"
},
"type": "doc"

View file

@ -1,303 +0,0 @@
{
"type": "index",
"value": {
"aliases": {
".kibana_$KIBANA_PACKAGE_VERSION": {},
".kibana": {}
},
"index": ".kibana_$KIBANA_PACKAGE_VERSION_001",
"mappings": {
"dynamic": "false",
"_meta": {
"indexTypesMap": {
".kibana_task_manager": [
"task"
],
".kibana": [
"apm-indices",
"apm-server-schema",
"apm-service-group",
"apm-telemetry",
"app_search_telemetry",
"application_usage_daily",
"application_usage_totals",
"config",
"config-global",
"core-usage-stats",
"enterprise_search_telemetry",
"event_loop_delays_daily",
"file",
"file-upload-usage-collection-telemetry",
"fileShare",
"guided-onboarding-guide-state",
"guided-onboarding-plugin-state",
"infrastructure-monitoring-log-view",
"infrastructure-ui-source",
"inventory-view",
"legacy-url-alias",
"metrics-explorer-view",
"ml-job",
"ml-module",
"ml-trained-model",
"monitoring-telemetry",
"sample-data-telemetry",
"slo",
"space",
"spaces-usage-stats",
"synthetics-monitor",
"synthetics-param",
"synthetics-privates-locations",
"tag",
"telemetry",
"ui-metric",
"upgrade-assistant-ml-upgrade-operation",
"upgrade-assistant-reindex-operation",
"uptime-dynamic-settings",
"uptime-synthetics-api-key",
"url",
"usage-counters",
"workplace_search_telemetry"
],
".kibana_ingest": [
"epm-packages",
"epm-packages-assets",
"fleet-fleet-server-host",
"fleet-message-signing-keys",
"fleet-preconfiguration-deletion-record",
"fleet-proxy",
"ingest-agent-policies",
"ingest-download-sources",
"ingest-outputs",
"ingest-package-policies",
"ingest_manager_settings"
],
".kibana_security_solution": [
"csp-rule-template",
"endpoint:user-artifact-manifest",
"exception-list",
"exception-list-agnostic",
"osquery-manager-usage-metric",
"osquery-pack",
"osquery-pack-asset",
"osquery-saved-query",
"security-rule",
"security-solution-signals-migration",
"siem-detection-engine-rule-actions",
"siem-ui-timeline",
"siem-ui-timeline-note",
"siem-ui-timeline-pinned-event"
],
".kibana_alerting_cases": [
"action",
"action_task_params",
"alert",
"api_key_pending_invalidation",
"cases",
"cases-comments",
"cases-configure",
"cases-connector-mappings",
"cases-telemetry",
"cases-user-actions",
"connector_token",
"maintenance-window",
"rules-settings"
],
".kibana_analytics": [
"canvas-element",
"canvas-workpad",
"canvas-workpad-template",
"dashboard",
"graph-workspace",
"index-pattern",
"kql-telemetry",
"lens",
"lens-ui-telemetry",
"map",
"query",
"search",
"search-session",
"search-telemetry",
"visualization"
]
}
},
"properties": {
"space": {
"dynamic": false,
"type": "object"
},
"type": {
"type": "keyword"
},
"migrationVersion": {
"dynamic": "true",
"type": "object"
}
}
},
"settings": {
"index": {
"auto_expand_replicas": "0-1",
"number_of_replicas": "0",
"number_of_shards": "1",
"mapping": {
"total_fields": {
"limit": 1500
}
}
}
}
}
}
{
"type": "index",
"value": {
"aliases": {
".kibana_analytics_$KIBANA_PACKAGE_VERSION": {},
".kibana_analytics": {}
},
"index": ".kibana_analytics_$KIBANA_PACKAGE_VERSION_001",
"mappings": {
"dynamic": "false",
"_meta": {
"indexTypesMap": {
".kibana_task_manager": [
"task"
],
".kibana": [
"apm-indices",
"apm-server-schema",
"apm-service-group",
"apm-telemetry",
"app_search_telemetry",
"application_usage_daily",
"application_usage_totals",
"config",
"config-global",
"core-usage-stats",
"enterprise_search_telemetry",
"event_loop_delays_daily",
"file",
"file-upload-usage-collection-telemetry",
"fileShare",
"guided-onboarding-guide-state",
"guided-onboarding-plugin-state",
"infrastructure-monitoring-log-view",
"infrastructure-ui-source",
"inventory-view",
"legacy-url-alias",
"metrics-explorer-view",
"ml-job",
"ml-module",
"ml-trained-model",
"monitoring-telemetry",
"sample-data-telemetry",
"slo",
"space",
"spaces-usage-stats",
"synthetics-monitor",
"synthetics-param",
"synthetics-privates-locations",
"tag",
"telemetry",
"ui-metric",
"upgrade-assistant-ml-upgrade-operation",
"upgrade-assistant-reindex-operation",
"uptime-dynamic-settings",
"uptime-synthetics-api-key",
"url",
"usage-counters",
"workplace_search_telemetry"
],
".kibana_ingest": [
"epm-packages",
"epm-packages-assets",
"fleet-fleet-server-host",
"fleet-message-signing-keys",
"fleet-preconfiguration-deletion-record",
"fleet-proxy",
"ingest-agent-policies",
"ingest-download-sources",
"ingest-outputs",
"ingest-package-policies",
"ingest_manager_settings"
],
".kibana_security_solution": [
"csp-rule-template",
"endpoint:user-artifact-manifest",
"exception-list",
"exception-list-agnostic",
"osquery-manager-usage-metric",
"osquery-pack",
"osquery-pack-asset",
"osquery-saved-query",
"security-rule",
"security-solution-signals-migration",
"siem-detection-engine-rule-actions",
"siem-ui-timeline",
"siem-ui-timeline-note",
"siem-ui-timeline-pinned-event"
],
".kibana_alerting_cases": [
"action",
"action_task_params",
"alert",
"api_key_pending_invalidation",
"cases",
"cases-comments",
"cases-configure",
"cases-connector-mappings",
"cases-telemetry",
"cases-user-actions",
"connector_token",
"maintenance-window",
"rules-settings"
],
".kibana_analytics": [
"canvas-element",
"canvas-workpad",
"canvas-workpad-template",
"dashboard",
"graph-workspace",
"index-pattern",
"kql-telemetry",
"lens",
"lens-ui-telemetry",
"map",
"query",
"search",
"search-session",
"search-telemetry",
"visualization"
]
}
},
"properties": {
"space": {
"dynamic": false,
"type": "object"
},
"type": {
"type": "keyword"
},
"migrationVersion": {
"dynamic": "true",
"type": "object"
}
}
},
"settings": {
"index": {
"auto_expand_replicas": "0-1",
"number_of_replicas": "0",
"number_of_shards": "1",
"mapping": {
"total_fields": {
"limit": 1500
}
}
}
}
}
}