Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ES client to 8.1.0-canary.2 #119791

Merged
merged 75 commits into from
Dec 24, 2021
Merged
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
6c197fc
upgrade es client to canary 37
Nov 28, 2021
072392c
fix error in core
Nov 28, 2021
8c0c445
mute error in test/
Nov 28, 2021
04a49aa
mute incompatible errors
Nov 28, 2021
808b5c9
unskip request_entity_too_large_exception test
Nov 28, 2021
0b13e50
commit autofix
Nov 28, 2021
e286b8d
unskip batch_size_bytes_exceeds_es_content_length test
Nov 29, 2021
bfebd9e
Merge branch 'main' into issue-119454-es-upgrade
Dec 14, 2021
227f901
fix errors in Core code
Dec 14, 2021
96cde79
fix or mute errors in data plugin
Dec 14, 2021
95528fd
fix data_view_management
Dec 14, 2021
64588f3
fix error index_management
Dec 14, 2021
95ef2c9
fix x-pack/test errors
Dec 14, 2021
de5c389
fix watcher
Dec 14, 2021
1ad0c55
fix event_log
Dec 14, 2021
e7e8cae
fix data_enhanced
Dec 14, 2021
5d1823b
fix uptime
Dec 14, 2021
c6825bd
fix triggers_actions_ui
Dec 14, 2021
2d4a432
fix transform
Dec 14, 2021
1b43084
fix reporting
Dec 14, 2021
ceb7ee8
fix rule_registry
Dec 14, 2021
282d8d5
fix timeline
Dec 14, 2021
ec2dc58
fix task_manager
Dec 14, 2021
e7ebd9e
fix security_solution
Dec 14, 2021
33067db
fix rule_registry
Dec 14, 2021
5bd9bd7
fix fleet
Dec 14, 2021
634106d
fix index_management
Dec 14, 2021
ca3a489
fix lens
Dec 14, 2021
5fe3d64
fix maps
Dec 14, 2021
43d0082
fix ml
Dec 14, 2021
34bfbbf
fix observability
Dec 14, 2021
12594b3
bump to canary 8.1-2
Dec 17, 2021
8cd6567
fix error in packages
Dec 17, 2021
078d6fc
fix errors in core
Dec 17, 2021
cf23498
fix errors in data
Dec 17, 2021
549027f
fix errors in discover
Dec 17, 2021
c734c15
fix some discover tests
Dec 17, 2021
2c4629a
fix errors in telemetry
Dec 17, 2021
eabcdff
fix alerting
Dec 17, 2021
515344b
fix errors in apm
Dec 17, 2021
2da5e47
fix errors in event_log
Dec 17, 2021
96da44a
fix errors in fleet
Dec 17, 2021
3023cc1
fix errors in infra
Dec 17, 2021
690f30e
fix errors in lists
Dec 17, 2021
a0e09cf
mute errors in maps
Dec 17, 2021
9c4e857
fix errors in ml
Dec 17, 2021
ed7efeb
fix errors in osquery
Dec 17, 2021
2176dcf
fix errors in security_solution
Dec 17, 2021
93cecbf
fix errors in stack_alerts
Dec 17, 2021
33cb1ea
fix errors in task_manager
Dec 17, 2021
ad010da
fix errors in timelines
Dec 17, 2021
f70f4a7
fix errors in transform
Dec 17, 2021
e42334c
fix errors in watcher
Dec 17, 2021
7bed4bc
fix errors in tests
Dec 17, 2021
a03d9cb
Merge branch 'main' into issue-119454-es-upgrade
Dec 17, 2021
c0b836f
update docs
Dec 17, 2021
1b5102e
adjust fleet code
Dec 17, 2021
0b1a0d5
fix problem in fleet
Dec 17, 2021
221ebbe
remove outdated _type from data plugin tests
Dec 17, 2021
87a4744
fix packages tests
Dec 17, 2021
44d148f
update type
Dec 17, 2021
b5a9a75
fix tests part 2
Dec 17, 2021
af6f006
Adds product header back to elasticsearch
TinaHeiligers Dec 17, 2021
f8d4b8b
Updates API docs
TinaHeiligers Dec 17, 2021
40551fd
Fix Discover tests
kertal Dec 21, 2021
182b967
Merge branch 'main' into issue-119454-es-upgrade
mshustov Dec 21, 2021
282d3ac
update alerting typings
mshustov Dec 21, 2021
d50c2e9
Fix type errors
dgieselaar Dec 22, 2021
31cdf17
Import Sort type
dgieselaar Dec 22, 2021
06a3f5b
Merge branch 'main' into issue-119454-es-upgrade
kibanamachine Dec 22, 2021
1eb5bfd
Update x-pack/plugins/security_solution/common/endpoint/data_loaders/…
afharo Dec 22, 2021
cfdd8b3
Remove double negation
afharo Dec 22, 2021
ae5ad9f
Merge branch 'main' of github.com:elastic/kibana into issue-119454-es…
afharo Dec 22, 2021
a3b4059
Fix snapshot conflict issues after merge from "main"
afharo Dec 23, 2021
53658ec
Merge branch 'main' into issue-119454-es-upgrade
kibanamachine Dec 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface SavedObjectsFindOptions
| [searchAfter?](./kibana-plugin-core-public.savedobjectsfindoptions.searchafter.md) | estypes.Id\[\] | <i>(Optional)</i> Use the sort values from the previous page to retrieve the next page of results. |
| [searchFields?](./kibana-plugin-core-public.savedobjectsfindoptions.searchfields.md) | string\[\] | <i>(Optional)</i> The fields to perform the parsed query against. See Elasticsearch Simple Query String <code>fields</code> argument for more information |
| [sortField?](./kibana-plugin-core-public.savedobjectsfindoptions.sortfield.md) | string | <i>(Optional)</i> |
| [sortOrder?](./kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md) | estypes.SearchSortOrder | <i>(Optional)</i> |
| [sortOrder?](./kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md) | estypes.SortOrder | <i>(Optional)</i> |
| [type](./kibana-plugin-core-public.savedobjectsfindoptions.type.md) | string \| string\[\] | |
| [typeToNamespacesMap?](./kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md) | Map&lt;string, string\[\] \| undefined&gt; | <i>(Optional)</i> This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the <code>type</code> and <code>namespaces</code> fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. |

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
sortOrder?: estypes.SearchSortOrder;
sortOrder?: estypes.SortOrder;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsErrorHelpers](./kibana-plugin-core-server.savedobjectserrorhelpers.md) &gt; [createGenericNotFoundEsUnavailableError](./kibana-plugin-core-server.savedobjectserrorhelpers.creategenericnotfoundesunavailableerror.md)

## SavedObjectsErrorHelpers.createGenericNotFoundEsUnavailableError() method

<b>Signature:</b>

```typescript
static createGenericNotFoundEsUnavailableError(type?: string | null, id?: string | null): DecoratedError;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| type | string \| null | |
| id | string \| null | |

<b>Returns:</b>

DecoratedError

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export declare class SavedObjectsErrorHelpers
| [createBadRequestError(reason)](./kibana-plugin-core-server.savedobjectserrorhelpers.createbadrequesterror.md) | <code>static</code> | |
| [createConflictError(type, id, reason)](./kibana-plugin-core-server.savedobjectserrorhelpers.createconflicterror.md) | <code>static</code> | |
| [createGenericNotFoundError(type, id)](./kibana-plugin-core-server.savedobjectserrorhelpers.creategenericnotfounderror.md) | <code>static</code> | |
| [createGenericNotFoundEsUnavailableError(type, id)](./kibana-plugin-core-server.savedobjectserrorhelpers.creategenericnotfoundesunavailableerror.md) | <code>static</code> | |
| [createIndexAliasNotFoundError(alias)](./kibana-plugin-core-server.savedobjectserrorhelpers.createindexaliasnotfounderror.md) | <code>static</code> | |
| [createInvalidVersionError(versionInput)](./kibana-plugin-core-server.savedobjectserrorhelpers.createinvalidversionerror.md) | <code>static</code> | |
| [createTooManyRequestsError(type, id)](./kibana-plugin-core-server.savedobjectserrorhelpers.createtoomanyrequestserror.md) | <code>static</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface SavedObjectsFindOptions
| [searchAfter?](./kibana-plugin-core-server.savedobjectsfindoptions.searchafter.md) | estypes.Id\[\] | <i>(Optional)</i> Use the sort values from the previous page to retrieve the next page of results. |
| [searchFields?](./kibana-plugin-core-server.savedobjectsfindoptions.searchfields.md) | string\[\] | <i>(Optional)</i> The fields to perform the parsed query against. See Elasticsearch Simple Query String <code>fields</code> argument for more information |
| [sortField?](./kibana-plugin-core-server.savedobjectsfindoptions.sortfield.md) | string | <i>(Optional)</i> |
| [sortOrder?](./kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md) | estypes.SearchSortOrder | <i>(Optional)</i> |
| [sortOrder?](./kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md) | estypes.SortOrder | <i>(Optional)</i> |
| [type](./kibana-plugin-core-server.savedobjectsfindoptions.type.md) | string \| string\[\] | |
| [typeToNamespacesMap?](./kibana-plugin-core-server.savedobjectsfindoptions.typetonamespacesmap.md) | Map&lt;string, string\[\] \| undefined&gt; | <i>(Optional)</i> This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the <code>type</code> and <code>namespaces</code> fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. |

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
sortOrder?: estypes.SearchSortOrder;
sortOrder?: estypes.SortOrder;
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace",
"@elastic/charts": "40.2.0",
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.35",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.1.0-canary.2",
"@elastic/ems-client": "8.0.0",
"@elastic/eui": "43.1.1",
"@elastic/filesaver": "1.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ interface SearchResponses {
total: number;
hits: Array<{
_index: string;
_type: string;
_id: string;
_source: Record<string, unknown>;
}>;
Expand Down Expand Up @@ -60,9 +59,9 @@ describe('esArchiver: createGenerateDocRecordsStream()', () => {
hits: {
total: 5,
hits: [
{ _index: 'foo', _type: '_doc', _id: '0', _source: {} },
{ _index: 'foo', _type: '_doc', _id: '1', _source: {} },
{ _index: 'foo', _type: '_doc', _id: '2', _source: {} },
{ _index: 'foo', _id: '0', _source: {} },
{ _index: 'foo', _id: '1', _source: {} },
{ _index: 'foo', _id: '2', _source: {} },
],
},
},
Expand All @@ -72,8 +71,8 @@ describe('esArchiver: createGenerateDocRecordsStream()', () => {
hits: {
total: 5,
hits: [
{ _index: 'foo', _type: '_doc', _id: '3', _source: {} },
{ _index: 'foo', _type: '_doc', _id: '4', _source: {} },
{ _index: 'foo', _id: '3', _source: {} },
{ _index: 'foo', _id: '4', _source: {} },
],
},
},
Expand All @@ -85,8 +84,8 @@ describe('esArchiver: createGenerateDocRecordsStream()', () => {
hits: {
total: 2,
hits: [
{ _index: 'bar', _type: '_doc', _id: '0', _source: {} },
{ _index: 'bar', _type: '_doc', _id: '1', _source: {} },
{ _index: 'bar', _id: '0', _source: {} },
{ _index: 'bar', _id: '1', _source: {} },
],
},
},
Expand All @@ -109,7 +108,6 @@ describe('esArchiver: createGenerateDocRecordsStream()', () => {
createMapStream((record: any) => {
expect(record).toHaveProperty('type', 'doc');
expect(record.value.source).toEqual({});
expect(record.value.type).toBe('_doc');
expect(record.value.index).toMatch(/^(foo|bar)$/);
expect(record.value.id).toMatch(/^\d+$/);
return `${record.value.index}:${record.value.id}`;
Expand Down Expand Up @@ -221,7 +219,7 @@ describe('esArchiver: createGenerateDocRecordsStream()', () => {

describe('keepIndexNames', () => {
it('changes .kibana* index names if keepIndexNames is not enabled', async () => {
const hits = [{ _index: '.kibana_7.16.0_001', _type: '_doc', _id: '0', _source: {} }];
const hits = [{ _index: '.kibana_7.16.0_001', _id: '0', _source: {} }];
const responses = {
['.kibana_7.16.0_001']: [{ body: { hits: { hits, total: hits.length } } }],
};
Expand All @@ -245,7 +243,7 @@ describe('esArchiver: createGenerateDocRecordsStream()', () => {
});

it('does not change non-.kibana* index names if keepIndexNames is not enabled', async () => {
const hits = [{ _index: '.foo', _type: '_doc', _id: '0', _source: {} }];
const hits = [{ _index: '.foo', _id: '0', _source: {} }];
const responses = {
['.foo']: [{ body: { hits: { hits, total: hits.length } } }],
};
Expand All @@ -269,7 +267,7 @@ describe('esArchiver: createGenerateDocRecordsStream()', () => {
});

it('does not change .kibana* index names if keepIndexNames is enabled', async () => {
const hits = [{ _index: '.kibana_7.16.0_001', _type: '_doc', _id: '0', _source: {} }];
const hits = [{ _index: '.kibana_7.16.0_001', _id: '0', _source: {} }];
const responses = {
['.kibana_7.16.0_001']: [{ body: { hits: { hits, total: hits.length } } }],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export function createGenerateDocRecordsStream({
// when it is loaded it can skip migration, if possible
index:
hit._index.startsWith('.kibana') && !keepIndexNames ? '.kibana_1' : hit._index,
type: hit._type,
id: hit._id,
source: hit._source,
},
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export const isValidFeatureId = (a: unknown): a is ValidFeatureId =>
* Ref: https://github.com/elastic/elasticsearch/issues/28806#issuecomment-369303620
*
* return stringified Long.MAX_VALUE if we receive Number.MAX_SAFE_INTEGER
* @param sortIds estypes.SearchSortResults | undefined
* @param sortIds estypes.SortResults | undefined
* @returns SortResults
*/
export const getSafeSortIds = (sortIds: estypes.SearchSortResults | null | undefined) => {
export const getSafeSortIds = (sortIds: estypes.SortResults | null | undefined) => {
if (sortIds == null) {
return sortIds;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ export interface SavedObjectsFindOptions {
// (undocumented)
sortField?: string;
// (undocumented)
sortOrder?: estypes.SearchSortOrder;
sortOrder?: estypes.SortOrder;
// (undocumented)
type: string | string[];
typeToNamespacesMap?: Map<string, string[] | undefined>;
Expand Down
26 changes: 18 additions & 8 deletions src/core/server/core_usage_data/core_usage_data_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import { hasConfigPathIntersection, ChangedDeprecatedPaths } from '@kbn/config';

import { CoreService } from 'src/core/types';
import { Logger, SavedObjectsServiceStart, SavedObjectTypeRegistry } from 'src/core/server';
import {
AggregationsFiltersAggregate,
AggregationsFiltersBucketItem,
import type {
AggregationsMultiBucketAggregateBase,
AggregationsSingleBucketAggregateBase,
SearchTotalHits,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { CoreContext } from '../core_context';
Expand Down Expand Up @@ -75,6 +75,13 @@ const kibanaOrTaskManagerIndex = (index: string, kibanaConfigIndex: string) => {
return index === kibanaConfigIndex ? '.kibana' : '.kibana_task_manager';
};

interface UsageDataAggs extends AggregationsMultiBucketAggregateBase {
buckets: {
disabled: AggregationsSingleBucketAggregateBase;
active: AggregationsSingleBucketAggregateBase;
};
}

export class CoreUsageDataService
implements CoreService<InternalCoreUsageDataSetup, CoreUsageDataStart>
{
Expand Down Expand Up @@ -153,7 +160,10 @@ export class CoreUsageDataService
private async getSavedObjectAliasUsageData(elasticsearch: ElasticsearchServiceStart) {
// Note: this agg can be changed to use `savedObjectsRepository.find` in the future after `filters` is supported.
// See src/core/server/saved_objects/service/lib/aggregations/aggs_types/bucket_aggs.ts for supported aggregations.
const { body: resp } = await elasticsearch.client.asInternalUser.search({
const { body: resp } = await elasticsearch.client.asInternalUser.search<
unknown,
{ aliases: UsageDataAggs }
>({
index: kibanaIndex,
body: {
track_total_hits: true,
Expand All @@ -179,10 +189,10 @@ export class CoreUsageDataService

const { hits, aggregations } = resp;
const totalCount = (hits.total as SearchTotalHits).value;
const aggregate = aggregations!.aliases as AggregationsFiltersAggregate;
const buckets = aggregate.buckets as Record<string, AggregationsFiltersBucketItem>;
const disabledCount = buckets.disabled.doc_count as number;
const activeCount = buckets.active.doc_count as number;
const aggregate = aggregations!.aliases;
const buckets = aggregate.buckets;
const disabledCount = buckets.disabled.doc_count;
const activeCount = buckets.active.doc_count;
const inactiveCount = totalCount - disabledCount - activeCount;

return { totalCount, disabledCount, activeCount, inactiveCount };
Expand Down
4 changes: 1 addition & 3 deletions src/core/server/elasticsearch/client/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type { DeeplyMockedKeys } from '@kbn/utility-types/jest';
import type { PublicKeys } from '@kbn/utility-types';
import { ElasticsearchClient } from './types';
import { ICustomClusterClient } from './cluster_client';
import { PRODUCT_RESPONSE_HEADER } from '../supported_server_response_check';

const omittedProps = [
'diagnostic',
Expand All @@ -22,9 +23,6 @@ const omittedProps = [
'helpers',
] as Array<PublicKeys<KibanaClient>>;

// the product header expected in every response from es
const PRODUCT_RESPONSE_HEADER = 'x-elastic-product';

// use jest.requireActual() to prevent weird errors when people mock @elastic/elasticsearch
const { Client: UnmockedClient } = jest.requireActual('@elastic/elasticsearch');
const createInternalClientMock = (res?: Promise<unknown>): DeeplyMockedKeys<KibanaClient> => {
Expand Down
5 changes: 5 additions & 0 deletions src/core/server/elasticsearch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ export type {
} from './client';
export { getRequestDebugMeta, getErrorMessage } from './client';
export { pollEsNodesVersion } from './version_check/ensure_es_version';
export {
isSupportedEsServer,
isNotFoundFromUnsupportedServer,
PRODUCT_RESPONSE_HEADER,
} from './supported_server_response_check';
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* 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 { isNotFoundFromUnsupportedServer } from './supported_server_response_check';

describe('#isNotFoundFromUnsupportedServer', () => {
it('returns true with not found response from unsupported server', () => {
const rawResponse = {
statusCode: 404,
headers: {},
};

const result = isNotFoundFromUnsupportedServer(rawResponse);
expect(result).toBe(true);
});

it('returns false with not found response from supported server', async () => {
const rawResponse = {
statusCode: 404,
headers: { 'x-elastic-product': 'Elasticsearch' },
};

const result = isNotFoundFromUnsupportedServer(rawResponse);
expect(result).toBe(false);
});

it('returns false when not a 404', async () => {
const rawResponse = {
statusCode: 200,
headers: { 'x-elastic-product': 'Elasticsearch' },
};

const result = isNotFoundFromUnsupportedServer(rawResponse);
expect(result).toBe(false);
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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.
*/
export const PRODUCT_RESPONSE_HEADER = 'x-elastic-product';
/**
* Response headers check to determine if the response is from Elasticsearch
* @param headers Response headers
* @returns boolean
*/
// This check belongs to the elasticsearch service as a dedicated helper method.
export const isSupportedEsServer = (
headers: Record<string, string | string[] | undefined> | null | undefined
) => {
return !!headers && headers[PRODUCT_RESPONSE_HEADER] === 'Elasticsearch';
};

/**
* Check to ensure that a 404 response does not come from Elasticsearch
*
* WARNING: This is a hack to work around for 404 responses returned from a proxy.
* We're aiming to minimise the risk of data loss when consumers act on Not Found errors
*
* @param response response from elasticsearch client call
* @returns boolean 'true' if the status code is 404 and the Elasticsearch product header is missing/unexpected value
*/
export const isNotFoundFromUnsupportedServer = (args: {
statusCode: number | null;
headers: Record<string, string | string[] | undefined> | null;
}): boolean => {
return args.statusCode === 404 && !isSupportedEsServer(args.headers);
};
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ describe('migration actions', () => {
// Allocate 1 replica so that this index stays yellow
number_of_replicas: '1',
// Disable all shard allocation so that the index status is red
'index.routing.allocation.enable': 'none',
index: { routing: { allocation: { enable: 'none' } } },
},
},
})
Expand Down Expand Up @@ -395,7 +395,7 @@ describe('migration actions', () => {
// Allocate 1 replica so that this index stays yellow
number_of_replicas: '1',
// Disable all shard allocation so that the index status is red
'index.routing.allocation.enable': 'none',
index: { routing: { allocation: { enable: 'none' } } },
},
},
})
Expand Down Expand Up @@ -1450,7 +1450,7 @@ describe('migration actions', () => {
// Allocate 1 replica so that this index stays yellow
number_of_replicas: '1',
// Disable all shard allocation so that the index status is red
'index.routing.allocation.enable': 'none',
index: { routing: { allocation: { enable: 'none' } } },
},
},
},
Expand Down Expand Up @@ -1567,8 +1567,8 @@ describe('migration actions', () => {
}
`);
});
// TODO: unskip after https://github.com/elastic/kibana/issues/116111
it.skip('resolves left request_entity_too_large_exception when the payload is too large', async () => {

it('resolves left request_entity_too_large_exception when the payload is too large', async () => {
const newDocs = new Array(10000).fill({
_source: {
title:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ describe('migration v2', () => {
{ index: '.kibana_7.13.0_001' },
{ meta: true }
);
const settings = response['.kibana_7.13.0_001']
.settings as estypes.IndicesIndexStatePrefixedSettings;
const settings = response['.kibana_7.13.0_001'].settings as estypes.IndicesIndexSettings;
expect(settings.index).not.toBeUndefined();
expect(settings.index!.blocks?.write).not.toEqual('true');
}
Expand Down
Loading