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.
[esArchiver] restrict from modifying saved objects indexes (elastic#1…
…69852) ## Summary Related to elastic#161882 The goal is to prevent FTR tests from new esArchives that overrides SO indexes. This PR adds the existing archives that re-create Saved Objects indexes into temporary exception list, located in `packages/kbn-es-archiver/src/fixtures/override_saved_objects_index/exception_list.json`. Whenever tests/archives are updated to not modify SO indexes, archive is expected to be removed from the list (progress can be tracked in elastic#169075, elastic#168973, elastic#168969, elastic#168926 ) Load action has a check if index is SO index and if the archive is in the exception list. This will throw error for the new archives, but still work as usual for the existing ones while teams updating the tests. Whenever test is loading archive listed in the exception list, the following warning message is logged: ``` warn x-pack/test/functional/es_archives/data/search_sessions overrides Saved Objects index(es) and placed temporary in the exception list. Please fix the archive and remove it from /Users/dmle/github/kibana/packages/kbn-es-archiver/src/fixtures/override_saved_objects_index/exception_list.json. For more details see: elastic#161882 ``` If the test loads a newly added archive that modifies a Saved Object index (e.g. `.kibana`), esArchiver will throw the error: ``` Error: esArchiver doesn't support modifying the existing Saved Objects index: '.kibana_1', please update its definition in mappings.json ```
- Loading branch information
1 parent
fb048e6
commit 6698810
Showing
14 changed files
with
180 additions
and
3,318 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
35 changes: 35 additions & 0 deletions
35
packages/kbn-es-archiver/src/fixtures/override_saved_objects_index/exception_list.json
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,35 @@ | ||
[ | ||
"x-pack/test/functional/es_archives/action_task_params", | ||
"x-pack/test/functional/es_archives/actions", | ||
"x-pack/test/functional/es_archives/alerting/8_2_0", | ||
"x-pack/test/functional/es_archives/alerts", | ||
"x-pack/test/functional/es_archives/alerts_legacy/rules", | ||
"x-pack/test/functional/es_archives/alerts_legacy/tasks", | ||
"x-pack/test/functional/es_archives/cases/default", | ||
"x-pack/test/functional/es_archives/cases/migrations/7.11.1", | ||
"x-pack/test/functional/es_archives/cases/migrations/7.13.2", | ||
"x-pack/test/functional/es_archives/cases/migrations/7.13_user_actions", | ||
"x-pack/test/functional/es_archives/cases/migrations/7.16.0_space", | ||
"x-pack/test/functional/es_archives/cases/migrations/8.8.0", | ||
"x-pack/test/functional/es_archives/data/search_sessions", | ||
"x-pack/test/functional/es_archives/endpoint/telemetry/agent_only", | ||
"x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_different_states", | ||
"x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_installed", | ||
"x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_uninstalled", | ||
"x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_malware_disabled", | ||
"x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_malware_enabled", | ||
"x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_uninstalled", | ||
"x-pack/test/functional/es_archives/event_log_legacy_ids", | ||
"x-pack/test/functional/es_archives/event_log_multiple_indicies", | ||
"x-pack/test/functional/es_archives/fleet/agents", | ||
"x-pack/test/functional/es_archives/lists", | ||
"x-pack/test/functional/es_archives/rules_scheduled_task_id/rules", | ||
"x-pack/test/functional/es_archives/rules_scheduled_task_id/tasks", | ||
"x-pack/test/functional/es_archives/security_solution/import_rule_connector", | ||
"x-pack/test/functional/es_archives/security_solution/migrations", | ||
"x-pack/test/functional/es_archives/security_solution/resolve_read_rules/7_14", | ||
"x-pack/test/functional/es_archives/security_solution/timelines/7.15.0", | ||
"x-pack/test/functional/es_archives/security_solution/timelines/7.15.0_space", | ||
"x-pack/test/functional/es_archives/task_manager_removed_types", | ||
"x-pack/test/functional/es_archives/task_manager_tasks" | ||
] |
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
78 changes: 78 additions & 0 deletions
78
test/functional/fixtures/kbn_archiver/canvas/workpad_pdf_test.json
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,78 @@ | ||
{ | ||
"attributes":{ | ||
"@created":"2020-10-21T23:50:26.466Z", | ||
"@timestamp":"2020-10-22T23:44:48.387Z", | ||
"assets":{}, | ||
"colors":[ | ||
"#37988d", | ||
"#c19628", | ||
"#b83c6f", | ||
"#3f9939", | ||
"#1785b0", | ||
"#ca5f35", | ||
"#45bdb0", | ||
"#f2bc33", | ||
"#e74b8b", | ||
"#4fbf48", | ||
"#1ea6dc", | ||
"#fd7643", | ||
"#72cec3", | ||
"#f5cc5d", | ||
"#ec77a8", | ||
"#7acf74", | ||
"#4cbce4", | ||
"#fd986f", | ||
"#a1ded7", | ||
"#f8dd91", | ||
"#f2a4c5", | ||
"#a6dfa2", | ||
"#86d2ed", | ||
"#fdba9f", | ||
"#000000", | ||
"#444444", | ||
"#777777", | ||
"#BBBBBB", | ||
"#FFFFFF", | ||
"rgba(255,255,255,0)" | ||
], | ||
"css":".canvasPage {\n\n}", | ||
"height":8, | ||
"isWriteable":true, | ||
"name":"The Very Cool Workpad for PDF Tests", | ||
"page":0, | ||
"pages":[ | ||
{ | ||
"elements":[ | ||
{ | ||
"expression":"shape \"square\" fill=\"#4cbce4\" border=\"rgba(255,255,255,0)\" borderWidth=0 maintainAspect=false\n| render", | ||
"id":"element-e05237c6-0fda-49e7-84fc-b8573739b515", | ||
"position":{ | ||
"angle":0, | ||
"height":18, | ||
"left":-1, | ||
"parent":null, | ||
"top":-1, | ||
"width":15.5 | ||
} | ||
} | ||
], | ||
"groups":[], | ||
"id":"page-c0e601aa-1c72-4d4a-b73f-8fb72a9d8d3a", | ||
"style":{ | ||
"background":"#FFF" | ||
}, | ||
"transition":{} | ||
} | ||
], | ||
"variables":[], | ||
"width":8 | ||
}, | ||
"coreMigrationVersion":"8.8.0", | ||
"id":"workpad-c13808dc-e690-4bab-be06-2073ba071754", | ||
"managed":false, | ||
"references":[], | ||
"type":"canvas-workpad", | ||
"typeMigrationVersion":"8.9.0", | ||
"updated_at":"2020-10-22T23:44:48.392Z", | ||
"version":"WzIsMl0=" | ||
} |
Binary file not shown.
Oops, something went wrong.