You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
See 20 TS2345 errors in two files when hook up nodejs to dashboards (related issue here ). Details are:
ensure_opensearch_version.ts
src/core/server/opensearch/version_check/ensure_opensearch_version.ts:211:5 - error TS2345: Argument of type 'OperatorFunction<number, unknown>' is not assignable to parameter of type 'OperatorFunction<number, NodesInfo>'. Type 'unknown' is not assignable to type 'NodesInfo'. 211 exhaustMap(() => { ~~~~~~~~~~~~~~~~~~ 212 /* ~~~~~~~~ ... 245 } ~~~~~~~ 246 }), ~~~~~~
src/core/server/opensearch/version_check/ensure_opensearch_version.ts:227:19 - error TS2345: Argument of type '({ body }: { body: any; }) => any' is not assignable to parameter of type '(value: unknown, index: number) => any'. Types of parameters '__0' and 'value' are incompatible. Type 'unknown' is not assignable to type '{ body: any; }'. 227 map(({ body }) => body),
src/core/server/opensearch/version_check/ensure_opensearch_version.ts:240:15 - error TS2345: Argument of type '({ body }: { body: any; }) => any' is not assignable to parameter of type '(value: unknown, index: number) => any'. Types of parameters '__0' and 'value' are incompatible. Type 'unknown' is not assignable to type '{ body: any; }'. 240 map(({ body }) => body),
opensearch_index.test.ts
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:44:42 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 44 const info = await Index.fetchInfo(client, '.opensearch_dashboards_test');
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:69:36 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 69 await expect(Index.fetchInfo(client, '.baz')).rejects.toThrow(```
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:88:36 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 88 await expect(Index.fetchInfo(client, '.baz')).rejects.toThrow(
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:104:42 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 104 const info = await Index.fetchInfo(client, '.baz');
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:116:31 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 116 await Index.createIndex(client, '.abcd', { foo: 'bar' } as any);
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:134:31 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 134 await Index.deleteIndex(client, '.lotr');
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:149:30 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 149 await Index.claimAlias(client, '.hola-42', '.hola');
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:174:30 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 174 await Index.claimAlias(client, '.ze-index', '.muchacha');
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:197:30 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 197 await Index.claimAlias(client, '.ze-index', '.muchacha', [
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:242:9 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 242 client,
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:322:41 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 322 await expect(Index.convertToAlias(client, info, '.muchacha', 10)).rejects.toThrow(
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:382:25 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 382 await Index.write(client, index, docs);
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:461:33 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 461 const read = Index.reader(client, index, { batchSize: 100, scrollDuration: '5m' });
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:514:33 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 514 const read = Index.reader(client, index, {
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:531:33 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 531 const read = Index.reader(client, index, {
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:566:33 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. 566 const read = Index.reader(client, index, {
src/core/server/saved_objects/migrations/core/opensearch_index.test.ts:595:60 - error TS2345: Argument of type 'DeeplyMockedKeys<OpenSearchClient>' is not assignable to parameter of type 'MigrationOpenSearchClient'. Type 'DeeplyMockedKeys<OpenSearchClient>' is missing the following properties from type 'MigrationOpenSearchClient': bulk, cat, clearScroll, count, and 5 more. 595 const hasMigrations = await Index.migrationsUpToDate(client, index, migrations);
To Reproduce
Hook up nodejs client to dashboards using node-14. I have a hooked up branch here. Then after removind node-modules, run yarn osd bootstrap.
Expected behavior
Fix the error.
The text was updated successfully, but these errors were encountered:
Describe the bug
See 20 TS2345 errors in two files when hook up nodejs to dashboards (related issue here ). Details are:
To Reproduce
Hook up nodejs client to dashboards using node-14. I have a hooked up branch here. Then after removind
node-modules
, runyarn osd bootstrap
.Expected behavior
Fix the error.
The text was updated successfully, but these errors were encountered: