Skip to content

Commit 9e7f51c

Browse files
authored
[9.1] [ska] relocate esArchives to platform/test/fixtures (#229750) (#230161)
# Backport This will backport the following commits from `main` to `9.1`: - [[ska] relocate esArchives to platform/test/fixtures (#229750)](#229750) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Dzmitry Lemechko","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-07-29T16:33:35Z","message":"[ska] relocate esArchives to platform/test/fixtures (#229750)\n\n## Summary\n\nPart of https://github.com/elastic/kibana-team/issues/1503\n\nThis PR is mostly about moving platform esArchives from\n`x-pack/test/functional` dir\n\nBefore\n```\nx-pack/test/functional/es_archives/\n```\n\nAfter: \n```\nx-pack/platform/test/fixtures/es_archives/\n```\n\nsome unused archives were deleted","sha":"2fb428aa8765c9e93f30ebb8d3e196e0012defbb","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport missing","backport:version","v9.2.0","v9.1.1","v8.19.1"],"title":"[ska] relocate esArchives to platform/test/fixtures","number":229750,"url":"https://github.com/elastic/kibana/pull/229750","mergeCommit":{"message":"[ska] relocate esArchives to platform/test/fixtures (#229750)\n\n## Summary\n\nPart of https://github.com/elastic/kibana-team/issues/1503\n\nThis PR is mostly about moving platform esArchives from\n`x-pack/test/functional` dir\n\nBefore\n```\nx-pack/test/functional/es_archives/\n```\n\nAfter: \n```\nx-pack/platform/test/fixtures/es_archives/\n```\n\nsome unused archives were deleted","sha":"2fb428aa8765c9e93f30ebb8d3e196e0012defbb"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/229750","number":229750,"mergeCommit":{"message":"[ska] relocate esArchives to platform/test/fixtures (#229750)\n\n## Summary\n\nPart of https://github.com/elastic/kibana-team/issues/1503\n\nThis PR is mostly about moving platform esArchives from\n`x-pack/test/functional` dir\n\nBefore\n```\nx-pack/test/functional/es_archives/\n```\n\nAfter: \n```\nx-pack/platform/test/fixtures/es_archives/\n```\n\nsome unused archives were deleted","sha":"2fb428aa8765c9e93f30ebb8d3e196e0012defbb"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
1 parent 7bd4106 commit 9e7f51c

File tree

836 files changed

+2199
-7245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

836 files changed

+2199
-7245
lines changed

.github/CODEOWNERS

Lines changed: 43 additions & 47 deletions
Large diffs are not rendered by default.

scripts/archive_migration_functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ migrate() {
350350

351351
load_logstash() {
352352
set -x
353-
node scripts/es_archiver.js load x-pack/test/functional/es_archives/logstash_functional --config "$test_config"
353+
node scripts/es_archiver.js load x-pack/platform/test/fixtures/es_archives/logstash_functional --config "$test_config"
354354
set +x
355355
}
356356

src/platform/packages/shared/kbn-es-archiver/README.mdx

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
---
22
id: kibDevDocsOpsEsArchiver
33
slug: /kibana-dev-docs/ops/es-archiver
4-
title: "ES Archiver"
4+
title: 'ES Archiver'
55
description: A tool which helps developers capture and restore ES indexes
66
date: 2024-01-11
7-
tags: ['kibana', 'dev', 'contributor', 'operations', 'ci', 'es-archiver', 'load', 'es-archiver-load-action', 'performance']
7+
tags:
8+
[
9+
'kibana',
10+
'dev',
11+
'contributor',
12+
'operations',
13+
'ci',
14+
'es-archiver',
15+
'load',
16+
'es-archiver-load-action',
17+
'performance',
18+
]
819
---
920

1021
The ES Archiver is a service primarily used by the Functional Tests to load up ES indexes using the bulk API which makes the archives more resilient to ES upgrades and easier to inspect/edit locally because they are just plain text files containing newline-delimited JSON (though they are sometimes compressed).
@@ -19,26 +30,25 @@ Additional information about what functionality the CLI provides can be found by
1930

2031
## Performance Option Parameter
2132

22-
We now have a performance parameter for the es-archiver#load(), entry-point
33+
We now have a performance parameter for the es-archiver#load(), entry-point
2334
function.
2435
This parameter is optional, with defaults:
2536

26-
- Batch size: 5000
27-
- Concurrency (maximum number of bulk requests that can be active in parallel): 4
37+
- Batch size: 5000
38+
- Concurrency (maximum number of bulk requests that can be active in parallel): 4
2839

29-
According to our benchmarks, these default settings are giving the best results in terms of loading time for
30-
the majority of the archives.
40+
According to our benchmarks, these default settings are giving the best results in terms of loading time for
41+
the majority of the archives.
3142
However, there might be cases where different settings are needed, so they can be overridden when loading an archive.
3243

33-
3444
### How to override the default performance settings in test files
3545

3646
To control the batch size and concurrency
3747

38-
#### Example
48+
#### Example
3949

4050
```typescript
41-
await esArchiver.load('x-pack/test/functional/es_archives/getting_started/shakespeare', {
51+
await esArchiver.load('x-pack/platform/test/fixtures/es_archives/getting_started/shakespeare', {
4252
performance: {
4353
batchSize: 300,
4454
concurrency: 1,
Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
[
2-
"x-pack/test/functional/es_archives/action_task_params",
3-
"x-pack/test/functional/es_archives/actions",
4-
"x-pack/test/functional/es_archives/alerting/8_2_0",
5-
"x-pack/test/functional/es_archives/alerts",
6-
"x-pack/test/functional/es_archives/alerts_legacy/rules",
7-
"x-pack/test/functional/es_archives/alerts_legacy/tasks",
8-
"x-pack/test/functional/es_archives/cases/default",
9-
"x-pack/test/functional/es_archives/cases/migrations/7.11.1",
10-
"x-pack/test/functional/es_archives/cases/migrations/7.13.2",
11-
"x-pack/test/functional/es_archives/cases/migrations/7.13_user_actions",
12-
"x-pack/test/functional/es_archives/cases/migrations/7.16.0_space",
13-
"x-pack/test/functional/es_archives/cases/migrations/8.8.0",
14-
"x-pack/test/functional/es_archives/data/search_sessions",
2+
"x-pack/platform/test/fixtures/es_archives/action_task_params",
3+
"x-pack/platform/test/fixtures/es_archives/actions",
4+
"x-pack/platform/test/fixtures/es_archives/alerting/8_2_0",
5+
"x-pack/platform/test/fixtures/es_archives/alerts",
6+
"x-pack/platform/test/fixtures/es_archives/cases/default",
7+
"x-pack/platform/test/fixtures/es_archives/cases/migrations/7.11.1",
8+
"x-pack/platform/test/fixtures/es_archives/cases/migrations/7.13.2",
9+
"x-pack/platform/test/fixtures/es_archives/cases/migrations/7.13_user_actions",
10+
"x-pack/platform/test/fixtures/es_archives/cases/migrations/7.16.0_space",
11+
"x-pack/platform/test/fixtures/es_archives/cases/migrations/8.8.0",
12+
"x-pack/platform/test/fixtures/es_archives/data/search_sessions",
1513
"x-pack/test/functional/es_archives/endpoint/telemetry/agent_only",
1614
"x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_different_states",
1715
"x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_installed",
1816
"x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_uninstalled",
1917
"x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_malware_disabled",
2018
"x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_malware_enabled",
2119
"x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_uninstalled",
22-
"x-pack/test/functional/es_archives/event_log_legacy_ids",
23-
"x-pack/test/functional/es_archives/event_log_multiple_indicies",
24-
"x-pack/test/functional/es_archives/fleet/agents",
25-
"x-pack/test/functional/es_archives/lists",
26-
"x-pack/test/functional/es_archives/rules_scheduled_task_id/rules",
27-
"x-pack/test/functional/es_archives/rules_scheduled_task_id/tasks",
20+
"x-pack/platform/test/fixtures/es_archives/event_log_legacy_ids",
21+
"x-pack/platform/test/fixtures/es_archives/event_log_multiple_indicies",
22+
"x-pack/platform/test/fixtures/es_archives/fleet/agents",
23+
"x-pack/platform/test/fixtures/es_archives/rules_scheduled_task_id/rules",
24+
"x-pack/platform/test/fixtures/es_archives/rules_scheduled_task_id/tasks",
2825
"x-pack/test/functional/es_archives/security_solution/import_rule_connector",
2926
"x-pack/test/functional/es_archives/security_solution/migrations",
3027
"x-pack/test/functional/es_archives/security_solution/resolve_read_rules/7_14",
3128
"x-pack/test/functional/es_archives/security_solution/timelines/7.15.0",
3229
"x-pack/test/functional/es_archives/security_solution/timelines/7.15.0_space",
33-
"x-pack/test/functional/es_archives/task_manager_removed_types",
34-
"x-pack/test/functional/es_archives/task_manager_tasks"
30+
"x-pack/platform/test/fixtures/es_archives/task_manager_removed_types",
31+
"x-pack/platform/test/fixtures/es_archives/task_manager_tasks"
3532
]

src/platform/test/examples/discover_customization_examples/customizations.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => {
2626
describe('Customizations', () => {
2727
before(async () => {
2828
await kibanaServer.savedObjects.cleanStandardList();
29-
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
29+
await esArchiver.loadIfNeeded(
30+
'x-pack/platform/test/fixtures/es_archives/logstash_functional'
31+
);
3032
await kibanaServer.importExport.load(
3133
'src/platform/test/functional/fixtures/kbn_archiver/discover'
3234
);
@@ -46,7 +48,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => {
4648
await kibanaServer.importExport.unload(
4749
'src/platform/test/functional/fixtures/kbn_archiver/discover'
4850
);
49-
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
51+
await esArchiver.unload('x-pack/platform/test/fixtures/es_archives/logstash_functional');
5052
await kibanaServer.savedObjects.cleanStandardList();
5153
});
5254

src/platform/test/examples/unified_field_list_examples/field_stats.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => {
2727
describe('Field stats', () => {
2828
before(async () => {
2929
await kibanaServer.savedObjects.cleanStandardList();
30-
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
30+
await esArchiver.loadIfNeeded(
31+
'x-pack/platform/test/fixtures/es_archives/logstash_functional'
32+
);
3133
await kibanaServer.importExport.load(
3234
'x-pack/test/functional/fixtures/kbn_archiver/visualize/default'
3335
);
34-
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/pre_calculated_histogram');
36+
await esArchiver.loadIfNeeded(
37+
'x-pack/platform/test/fixtures/es_archives/pre_calculated_histogram'
38+
);
3539
await PageObjects.common.navigateToApp('unifiedFieldListExamples');
3640
await PageObjects.header.waitUntilLoadingHasFinished();
3741
await retry.waitFor('combobox is ready', async () => {
@@ -47,8 +51,8 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => {
4751
});
4852

4953
after(async () => {
50-
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
51-
await esArchiver.unload('x-pack/test/functional/es_archives/pre_calculated_histogram');
54+
await esArchiver.unload('x-pack/platform/test/fixtures/es_archives/logstash_functional');
55+
await esArchiver.unload('x-pack/platform/test/fixtures/es_archives/pre_calculated_histogram');
5256
await kibanaServer.savedObjects.cleanStandardList();
5357
await PageObjects.unifiedFieldList.cleanSidebarLocalStorage();
5458
});

src/platform/test/examples/unified_tabs_examples/manage_tabs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => {
4747
});
4848

4949
after(async () => {
50-
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
50+
await esArchiver.unload('x-pack/platform/test/fixtures/es_archives/logstash_functional');
5151
await kibanaServer.savedObjects.cleanStandardList();
5252
});
5353

src/platform/test/functional/apps/discover/group4/_adhoc_data_views.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
5858

5959
after(async () => {
6060
await kibanaServer.savedObjects.cleanStandardList();
61-
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
61+
await esArchiver.unload('x-pack/platform/test/fixtures/es_archives/logstash_functional');
6262
});
6363

6464
it('should navigate back correctly from to surrounding and single views', async () => {

src/platform/test/functional/apps/discover/group4/_data_view_edit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
4343

4444
after(async () => {
4545
await kibanaServer.savedObjects.cleanStandardList();
46-
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
46+
await esArchiver.unload('x-pack/platform/test/fixtures/es_archives/logstash_functional');
4747
await es.transport.request({
4848
path: '/data-view-index-000001',
4949
method: 'DELETE',

src/platform/test/functional/apps/discover/group4/_field_list_new_fields.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
4141

4242
after(async () => {
4343
await kibanaServer.savedObjects.cleanStandardList();
44-
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
44+
await esArchiver.unload('x-pack/platform/test/fixtures/es_archives/logstash_functional');
4545
await es.transport.request({
4646
path: '/my-index-000001',
4747
method: 'DELETE',

0 commit comments

Comments
 (0)