Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] Update archives to 8.17.0 binary data format, unskip test (#196641
) (#196706) # Backport This will backport the following commits from `main` to `8.x`: - [Update archives to 8.17.0 binary data format, unskip test (#196641)](#196641) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Gerard Soldevila","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-17T10:49:11Z","message":"Update archives to 8.17.0 binary data format, unskip test (#196641)\n\n## Summary\r\n\r\nAddresses https://github.com/elastic/kibana/issues/167676\r\nAddresses https://github.com/elastic/kibana/issues/158318\r\nAddresses https://github.com/elastic/kibana/issues/163254\r\nAddresses https://github.com/elastic/kibana/issues/163255\r\n\r\n#### Fix for `multiple_es_nodes.test.ts`\r\nInspired on https://github.com/elastic/kibana/pull/193899\r\n\r\n1. Start both nodes of ES 8.17.0 with the affected data-archive on\r\nseparate terminals:\r\n1. Node 01: `yarn es snapshot --version=8.17.0 --data-archive\r\nsrc/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip\r\n--base-path .es/node01`\r\n2. Node 02: `yarn es snapshot --version=8.17.0 --data-archive\r\nsrc/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip\r\n--base-path .es/node02`\r\n\r\n2. After ES is ready (without starting Kibana), reindex the index\r\n`.kibana_7.13.0_002`\r\n1. Retrieve the settings from the original index via `curl -L\r\n'http://localhost:9200/.kibana_7.13.0_002' -H 'Content-Type:\r\napplication/json' -H 'kbn-xsrf: test' -H 'Authorization: Basic\r\nc3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l' -d ''`\r\n\t2. Create the target index with those settings: \r\n\t```shell\r\ncurl -L -X PUT 'http://localhost:9200/.kibana_7.13.0_003' -H\r\n'Content-Type: application/json' -H 'kbn-xsrf: test' -H 'Authorization:\r\nBasic c3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l' -d '{\r\n \"mappings\": {\r\n \"properties\": {\r\n \"bar\": {\r\n \"properties\": {\r\n \"status\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"coreMigrationVersion\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"foo\": {\r\n \"properties\": {\r\n \"status\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"migrationVersion\": {\r\n \"dynamic\": \"true\",\r\n \"properties\": {\r\n \"bar\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n }\r\n }\r\n },\r\n \"foo\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"namespace\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"namespaces\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"originId\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"references\": {\r\n \"type\": \"nested\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"name\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"type\": {\r\n \"type\": \"keyword\"\r\n }\r\n }\r\n },\r\n \"type\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"updated_at\": {\r\n \"type\": \"date\"\r\n }\r\n }\r\n },\r\n \"settings\": {\r\n \"index\": {\r\n \"hidden\": \"true\",\r\n \"number_of_shards\": \"1\",\r\n \"number_of_replicas\": \"0\"\r\n }\r\n }\r\n }'\r\n ```\r\n3. Reindex the content: `curl -L 'http://localhost:9200/_reindex' -H\r\n'Content-Type: application/json' -H 'kbn-xsrf: test' -H 'Authorization:\r\nBasic c3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l' -d '{ \"source\": {\r\n\"index\": \".kibana_7.13.0_002\" }, \"dest\": { \"index\": \".kibana_7.13.0_003\"\r\n} }'`\r\n 4. Remove the old index and recreate the aliases\r\n ```shell\r\ncurl -L 'http://localhost:9200/_aliases' -H 'Content-Type:\r\napplication/json' -H 'kbn-xsrf: test' -H 'Authorization: Basic\r\nc3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l' -d '{\r\n \"actions\": [\r\n{ \"add\": { \"index\": \".kibana_7.13.0_003\", \"alias\": \".kibana_7.13.0_001\"\r\n} },\r\n { \"remove_index\": {\"index\": \".kibana_7.13.0_002\" } },\r\n{ \"add\": { \"index\": \".kibana_7.13.0_003\", \"alias\": \".kibana_7.13.0\" } },\r\n { \"add\": { \"index\": \".kibana_7.13.0_003\", \"alias\": \".kibana\" } }\r\n ]\r\n}'\r\n\t```\r\n3. Stop both ES nodes.\r\n4. Compress both archives\r\n\t```shell\r\n\tcd .es/node01/8.17.0\r\nrm -rf data/nodes # we need to remove this dir or it fails to start\r\nagain\r\nzip -r\r\n../../../src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip\r\ndata -x \"*/\\.*\"\r\n\tcd ../../../\r\n\tcd .es/node02/8.17.0\r\nrm -rf data/nodes # we need to remove this dir or it fails to start\r\nagain\r\nzip -r\r\n../../../src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip\r\ndata -x \"*/\\.*\"\r\n\tcd ../../../\r\n\t```\r\n5. Run the tests to confirm that the issue is fixed: `yarn\r\ntest:jest_integration\r\nsrc/core/server/integration_tests/saved_objects/migrations/group3/multiple_es_nodes.test.ts`\r\n\r\n#### Fix for `incompatible_cluster_routing_allocation.test.ts`\r\nInspired on https://github.com/elastic/kibana/pull/193741\r\n\r\n```shell\r\n# 1. Start ES 8.17.0 with the affected data-archive\r\nyarn es snapshot --version=8.17.0 --data-archive src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_v1_migrations_sample_data_saved_objects.zip\r\n# ... after ES has completely started up, stop it.\r\n\r\n# 2. Compress the archive\r\ncd .es/8.17.0\r\nzip -r ../../src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_v1_migrations_sample_data_saved_objects.zip data -x \"*/\\.*\"\r\ncd ../../\r\n\r\n# 3. Run the tests to confirm that the issue is fixed.\r\nyarn test:jest_integration src/core/server/integration_tests/saved_objects/migrations/group3/incompatible_cluster_routing_allocation.test.ts\r\n```\r\n\r\n#### Fix for `read_batch_size.test.ts`\r\nInspired on https://github.com/elastic/kibana/pull/193899\r\n\r\n```shell\r\n# 1. Start ES 8.17.0 with the affected data-archive\r\nyarn es snapshot --version=8.17.0 --data-archive src/core/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip\r\n# ... after ES has completely started up, stop it.\r\n\r\n# 2. Compress the archive\r\ncd .es/8.17.0\r\nzip -r ../../src/core/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip data -x \"*/\\.*\"\r\ncd ../../\r\n\r\n# 3. Run the tests to confirm that the issue is fixed.\r\nyarn test:jest_integration src/core/server/integration_tests/saved_objects/migrations/group3/read_batch_size.test.ts\r\n```","sha":"3d254c223f101a6ee326b57d45b9997a87eb12da","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","Feature:Migrations","backport:prev-minor"],"number":196641,"url":"https://github.com/elastic/kibana/pull/196641","mergeCommit":{"message":"Update archives to 8.17.0 binary data format, unskip test (#196641)\n\n## Summary\r\n\r\nAddresses https://github.com/elastic/kibana/issues/167676\r\nAddresses https://github.com/elastic/kibana/issues/158318\r\nAddresses https://github.com/elastic/kibana/issues/163254\r\nAddresses https://github.com/elastic/kibana/issues/163255\r\n\r\n#### Fix for `multiple_es_nodes.test.ts`\r\nInspired on https://github.com/elastic/kibana/pull/193899\r\n\r\n1. Start both nodes of ES 8.17.0 with the affected data-archive on\r\nseparate terminals:\r\n1. Node 01: `yarn es snapshot --version=8.17.0 --data-archive\r\nsrc/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip\r\n--base-path .es/node01`\r\n2. Node 02: `yarn es snapshot --version=8.17.0 --data-archive\r\nsrc/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip\r\n--base-path .es/node02`\r\n\r\n2. After ES is ready (without starting Kibana), reindex the index\r\n`.kibana_7.13.0_002`\r\n1. Retrieve the settings from the original index via `curl -L\r\n'http://localhost:9200/.kibana_7.13.0_002' -H 'Content-Type:\r\napplication/json' -H 'kbn-xsrf: test' -H 'Authorization: Basic\r\nc3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l' -d ''`\r\n\t2. Create the target index with those settings: \r\n\t```shell\r\ncurl -L -X PUT 'http://localhost:9200/.kibana_7.13.0_003' -H\r\n'Content-Type: application/json' -H 'kbn-xsrf: test' -H 'Authorization:\r\nBasic c3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l' -d '{\r\n \"mappings\": {\r\n \"properties\": {\r\n \"bar\": {\r\n \"properties\": {\r\n \"status\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"coreMigrationVersion\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"foo\": {\r\n \"properties\": {\r\n \"status\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"migrationVersion\": {\r\n \"dynamic\": \"true\",\r\n \"properties\": {\r\n \"bar\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n }\r\n }\r\n },\r\n \"foo\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"namespace\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"namespaces\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"originId\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"references\": {\r\n \"type\": \"nested\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"name\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"type\": {\r\n \"type\": \"keyword\"\r\n }\r\n }\r\n },\r\n \"type\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"updated_at\": {\r\n \"type\": \"date\"\r\n }\r\n }\r\n },\r\n \"settings\": {\r\n \"index\": {\r\n \"hidden\": \"true\",\r\n \"number_of_shards\": \"1\",\r\n \"number_of_replicas\": \"0\"\r\n }\r\n }\r\n }'\r\n ```\r\n3. Reindex the content: `curl -L 'http://localhost:9200/_reindex' -H\r\n'Content-Type: application/json' -H 'kbn-xsrf: test' -H 'Authorization:\r\nBasic c3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l' -d '{ \"source\": {\r\n\"index\": \".kibana_7.13.0_002\" }, \"dest\": { \"index\": \".kibana_7.13.0_003\"\r\n} }'`\r\n 4. Remove the old index and recreate the aliases\r\n ```shell\r\ncurl -L 'http://localhost:9200/_aliases' -H 'Content-Type:\r\napplication/json' -H 'kbn-xsrf: test' -H 'Authorization: Basic\r\nc3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l' -d '{\r\n \"actions\": [\r\n{ \"add\": { \"index\": \".kibana_7.13.0_003\", \"alias\": \".kibana_7.13.0_001\"\r\n} },\r\n { \"remove_index\": {\"index\": \".kibana_7.13.0_002\" } },\r\n{ \"add\": { \"index\": \".kibana_7.13.0_003\", \"alias\": \".kibana_7.13.0\" } },\r\n { \"add\": { \"index\": \".kibana_7.13.0_003\", \"alias\": \".kibana\" } }\r\n ]\r\n}'\r\n\t```\r\n3. Stop both ES nodes.\r\n4. Compress both archives\r\n\t```shell\r\n\tcd .es/node01/8.17.0\r\nrm -rf data/nodes # we need to remove this dir or it fails to start\r\nagain\r\nzip -r\r\n../../../src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip\r\ndata -x \"*/\\.*\"\r\n\tcd ../../../\r\n\tcd .es/node02/8.17.0\r\nrm -rf data/nodes # we need to remove this dir or it fails to start\r\nagain\r\nzip -r\r\n../../../src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip\r\ndata -x \"*/\\.*\"\r\n\tcd ../../../\r\n\t```\r\n5. Run the tests to confirm that the issue is fixed: `yarn\r\ntest:jest_integration\r\nsrc/core/server/integration_tests/saved_objects/migrations/group3/multiple_es_nodes.test.ts`\r\n\r\n#### Fix for `incompatible_cluster_routing_allocation.test.ts`\r\nInspired on https://github.com/elastic/kibana/pull/193741\r\n\r\n```shell\r\n# 1. Start ES 8.17.0 with the affected data-archive\r\nyarn es snapshot --version=8.17.0 --data-archive src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_v1_migrations_sample_data_saved_objects.zip\r\n# ... after ES has completely started up, stop it.\r\n\r\n# 2. Compress the archive\r\ncd .es/8.17.0\r\nzip -r ../../src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_v1_migrations_sample_data_saved_objects.zip data -x \"*/\\.*\"\r\ncd ../../\r\n\r\n# 3. Run the tests to confirm that the issue is fixed.\r\nyarn test:jest_integration src/core/server/integration_tests/saved_objects/migrations/group3/incompatible_cluster_routing_allocation.test.ts\r\n```\r\n\r\n#### Fix for `read_batch_size.test.ts`\r\nInspired on https://github.com/elastic/kibana/pull/193899\r\n\r\n```shell\r\n# 1. Start ES 8.17.0 with the affected data-archive\r\nyarn es snapshot --version=8.17.0 --data-archive src/core/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip\r\n# ... after ES has completely started up, stop it.\r\n\r\n# 2. Compress the archive\r\ncd .es/8.17.0\r\nzip -r ../../src/core/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip data -x \"*/\\.*\"\r\ncd ../../\r\n\r\n# 3. Run the tests to confirm that the issue is fixed.\r\nyarn test:jest_integration src/core/server/integration_tests/saved_objects/migrations/group3/read_batch_size.test.ts\r\n```","sha":"3d254c223f101a6ee326b57d45b9997a87eb12da"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196641","number":196641,"mergeCommit":{"message":"Update archives to 8.17.0 binary data format, unskip test (#196641)\n\n## Summary\r\n\r\nAddresses https://github.com/elastic/kibana/issues/167676\r\nAddresses https://github.com/elastic/kibana/issues/158318\r\nAddresses https://github.com/elastic/kibana/issues/163254\r\nAddresses https://github.com/elastic/kibana/issues/163255\r\n\r\n#### Fix for `multiple_es_nodes.test.ts`\r\nInspired on https://github.com/elastic/kibana/pull/193899\r\n\r\n1. Start both nodes of ES 8.17.0 with the affected data-archive on\r\nseparate terminals:\r\n1. Node 01: `yarn es snapshot --version=8.17.0 --data-archive\r\nsrc/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip\r\n--base-path .es/node01`\r\n2. Node 02: `yarn es snapshot --version=8.17.0 --data-archive\r\nsrc/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip\r\n--base-path .es/node02`\r\n\r\n2. After ES is ready (without starting Kibana), reindex the index\r\n`.kibana_7.13.0_002`\r\n1. Retrieve the settings from the original index via `curl -L\r\n'http://localhost:9200/.kibana_7.13.0_002' -H 'Content-Type:\r\napplication/json' -H 'kbn-xsrf: test' -H 'Authorization: Basic\r\nc3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l' -d ''`\r\n\t2. Create the target index with those settings: \r\n\t```shell\r\ncurl -L -X PUT 'http://localhost:9200/.kibana_7.13.0_003' -H\r\n'Content-Type: application/json' -H 'kbn-xsrf: test' -H 'Authorization:\r\nBasic c3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l' -d '{\r\n \"mappings\": {\r\n \"properties\": {\r\n \"bar\": {\r\n \"properties\": {\r\n \"status\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"coreMigrationVersion\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"foo\": {\r\n \"properties\": {\r\n \"status\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"migrationVersion\": {\r\n \"dynamic\": \"true\",\r\n \"properties\": {\r\n \"bar\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n }\r\n }\r\n },\r\n \"foo\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"namespace\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"namespaces\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"originId\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"references\": {\r\n \"type\": \"nested\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"name\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"type\": {\r\n \"type\": \"keyword\"\r\n }\r\n }\r\n },\r\n \"type\": {\r\n \"type\": \"keyword\"\r\n },\r\n \"updated_at\": {\r\n \"type\": \"date\"\r\n }\r\n }\r\n },\r\n \"settings\": {\r\n \"index\": {\r\n \"hidden\": \"true\",\r\n \"number_of_shards\": \"1\",\r\n \"number_of_replicas\": \"0\"\r\n }\r\n }\r\n }'\r\n ```\r\n3. Reindex the content: `curl -L 'http://localhost:9200/_reindex' -H\r\n'Content-Type: application/json' -H 'kbn-xsrf: test' -H 'Authorization:\r\nBasic c3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l' -d '{ \"source\": {\r\n\"index\": \".kibana_7.13.0_002\" }, \"dest\": { \"index\": \".kibana_7.13.0_003\"\r\n} }'`\r\n 4. Remove the old index and recreate the aliases\r\n ```shell\r\ncurl -L 'http://localhost:9200/_aliases' -H 'Content-Type:\r\napplication/json' -H 'kbn-xsrf: test' -H 'Authorization: Basic\r\nc3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l' -d '{\r\n \"actions\": [\r\n{ \"add\": { \"index\": \".kibana_7.13.0_003\", \"alias\": \".kibana_7.13.0_001\"\r\n} },\r\n { \"remove_index\": {\"index\": \".kibana_7.13.0_002\" } },\r\n{ \"add\": { \"index\": \".kibana_7.13.0_003\", \"alias\": \".kibana_7.13.0\" } },\r\n { \"add\": { \"index\": \".kibana_7.13.0_003\", \"alias\": \".kibana\" } }\r\n ]\r\n}'\r\n\t```\r\n3. Stop both ES nodes.\r\n4. Compress both archives\r\n\t```shell\r\n\tcd .es/node01/8.17.0\r\nrm -rf data/nodes # we need to remove this dir or it fails to start\r\nagain\r\nzip -r\r\n../../../src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip\r\ndata -x \"*/\\.*\"\r\n\tcd ../../../\r\n\tcd .es/node02/8.17.0\r\nrm -rf data/nodes # we need to remove this dir or it fails to start\r\nagain\r\nzip -r\r\n../../../src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip\r\ndata -x \"*/\\.*\"\r\n\tcd ../../../\r\n\t```\r\n5. Run the tests to confirm that the issue is fixed: `yarn\r\ntest:jest_integration\r\nsrc/core/server/integration_tests/saved_objects/migrations/group3/multiple_es_nodes.test.ts`\r\n\r\n#### Fix for `incompatible_cluster_routing_allocation.test.ts`\r\nInspired on https://github.com/elastic/kibana/pull/193741\r\n\r\n```shell\r\n# 1. Start ES 8.17.0 with the affected data-archive\r\nyarn es snapshot --version=8.17.0 --data-archive src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_v1_migrations_sample_data_saved_objects.zip\r\n# ... after ES has completely started up, stop it.\r\n\r\n# 2. Compress the archive\r\ncd .es/8.17.0\r\nzip -r ../../src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_v1_migrations_sample_data_saved_objects.zip data -x \"*/\\.*\"\r\ncd ../../\r\n\r\n# 3. Run the tests to confirm that the issue is fixed.\r\nyarn test:jest_integration src/core/server/integration_tests/saved_objects/migrations/group3/incompatible_cluster_routing_allocation.test.ts\r\n```\r\n\r\n#### Fix for `read_batch_size.test.ts`\r\nInspired on https://github.com/elastic/kibana/pull/193899\r\n\r\n```shell\r\n# 1. Start ES 8.17.0 with the affected data-archive\r\nyarn es snapshot --version=8.17.0 --data-archive src/core/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip\r\n# ... after ES has completely started up, stop it.\r\n\r\n# 2. Compress the archive\r\ncd .es/8.17.0\r\nzip -r ../../src/core/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip data -x \"*/\\.*\"\r\ncd ../../\r\n\r\n# 3. Run the tests to confirm that the issue is fixed.\r\nyarn test:jest_integration src/core/server/integration_tests/saved_objects/migrations/group3/read_batch_size.test.ts\r\n```","sha":"3d254c223f101a6ee326b57d45b9997a87eb12da"}}]}] BACKPORT-->
- Loading branch information