-
Notifications
You must be signed in to change notification settings - Fork 913
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
[NodeJS] Dashboards is not compatible with nodejs client #837
Comments
5 tasks
kavilla
changed the title
Dashboards is not compatible with nodejs client
[OSJS] Dashboards is not compatible with nodejs client
Jan 5, 2022
kavilla
changed the title
[OSJS] Dashboards is not compatible with nodejs client
[NodeJS] Dashboards is not compatible with nodejs client
Jan 11, 2022
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Jan 27, 2022
change @elastic/elasticsearch to @opensearch-project/opensearch Partically Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Jan 27, 2022
change @elastic/elasticsearch to @opensearch-project/opensearch Partically Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Jan 27, 2022
change @elastic/elasticsearch to @opensearch-project/opensearch Partically Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Jan 27, 2022
change @elastic/elasticsearch to @opensearch-project/opensearch Partically Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
This was referenced Feb 7, 2022
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 7, 2022
1.import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2.add support functions. for example, add a support function for converting a possibly not existant doc to an existant doc. 3.add @ts-expect-error to expected mismatches 4.fix undefined and mismatched types 5.fix unit tests in src/core/server/saved_objects Issue Resolved: opensearch-project#1216 Partical Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 7, 2022
1. import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2. remove asynSearch 3. apply type assertion 4. fix undefined and mismatched types Remove retry_call_cluster.test.ts due to removing all asyncSearch api Issue Resolved: opensearch-project#1193 Partical Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 8, 2022
1.import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2.add support functions. for example, add a support function for converting a possibly not existant doc to an existant doc. 3.add @ts-expect-error to expected mismatches 4.fix undefined and mismatched types 5.fix unit tests in src/core/server/saved_objects Issue Resolved: opensearch-project#1216 Partical Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 8, 2022
1.import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2.add support functions. for example, add a support function for converting a possibly not existant doc to an existant doc. 3.add @ts-expect-error to expected mismatches 4.fix undefined and mismatched types 5.fix unit tests in src/core/server/saved_objects Issue Resolved: opensearch-project#1216 Partical Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 8, 2022
…service.ts Fix issues in src/core/server/core_usage_data_service.ts. Change types of property docsCount,docsDeleted,storeSizeBytes and primaryStoreSizeBytes from 'string | undefined to 'number'. Issue Resolved: opensearch-project#1224 Partical Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
7 tasks
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 17, 2022
Partially Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 17, 2022
Partially Resolved:opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
7 tasks
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 17, 2022
add path in tsconfig.base.json to let nodejs types point to api/new.d.ts which is the new defined types Partially Resolved:opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Feb 17, 2022
1. import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2. remove asynSearch 3. apply type assertion 4. fix undefined and mismatched types Remove retry_call_cluster.test.ts due to removing all asyncSearch api Issue Resolved: #1193 Partical Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 17, 2022
1.import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2.add support functions. for example, add a support function for converting a possibly not existant doc to an existant doc. 3.add @ts-expect-error to expected mismatches 4.fix undefined and mismatched types 5.fix unit tests in src/core/server/saved_objects Fix comments and modify import types Issue Resolved: opensearch-project#1216 Partical Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 23, 2022
Partially Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Feb 28, 2022
add path in tsconfig.base.json to let nodejs types point to api/new.d.ts which is the new defined types Partially Resolved:#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 28, 2022
…1181) change @elastic/elasticsearch to @opensearch-project/opensearch Partically Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 28, 2022
Partially Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Feb 28, 2022
Native realm is not supported by current nodejs client. Partically Resolved:opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Mar 2, 2022
…service.ts (#1225) Fix issues in src/core/server/core_usage_data_service.ts. Change types of property docsCount,docsDeleted,storeSizeBytes and primaryStoreSizeBytes from 'string | undefined to 'number'. Issue Resolved: #1224 Partical Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Mar 2, 2022
Native realm is not supported by current nodejs client. Partically Resolved:opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Mar 2, 2022
Native realm is not supported by current nodejs client. This will solve nodejs client integration issue. Partically Resolved:opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Mar 2, 2022
1.import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2.add support functions. for example, add a support function for converting a possibly not existant doc to an existant doc. 3.add @ts-expect-error to expected mismatches 4.fix undefined and mismatched types 5.fix unit tests in src/core/server/saved_objects Fix comments and modify import types Remove require_alias remove coreMigrationVersion to avoid bwc issue Issue Resolved: opensearch-project#1216 Partical Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]> modify repository Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Mar 3, 2022
Native realm is not supported by current nodejs client. This will solve nodejs client integration issue. Partically Resolved:#837 Signed-off-by: Anan Zhuang <[email protected]>
Tengda-He
pushed a commit
to Tengda-He/OpenSearch-Dashboards
that referenced
this issue
Mar 3, 2022
Native realm is not supported by current nodejs client. This will solve nodejs client integration issue. Partically Resolved:opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Mar 4, 2022
1.import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2.add support functions. for example, add a support function for converting a possibly not existant doc to an existant doc. 3.add @ts-expect-error to expected mismatches 4.fix undefined and mismatched types 5.fix unit tests in src/core/server/saved_objects Fix comments and modify import types Remove require_alias remove coreMigrationVersion to avoid bwc issue modify repository add param comments Issue Resolved: opensearch-project#1216 Partical Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Mar 4, 2022
…1223) 1.import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2.add support functions. for example, add a support function for converting a possibly not existant doc to an existant doc. 3.add @ts-expect-error to expected mismatches 4.fix undefined and mismatched types 5.fix unit tests in src/core/server/saved_objects Fix comments and modify import types Remove require_alias remove coreMigrationVersion to avoid bwc issue modify repository add param comments Issue Resolved: #1216 Partical Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Mar 5, 2022
change @elastic/elasticsearch to @opensearch-project/opensearch Partically Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Mar 5, 2022
1. import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2. remove asynSearch 3. apply type assertion 4. fix undefined and mismatched types Remove retry_call_cluster.test.ts due to removing all asyncSearch api Issue Resolved: #1193 Partical Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Mar 5, 2022
add path in tsconfig.base.json to let nodejs types point to api/new.d.ts which is the new defined types Partially Resolved:#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Mar 5, 2022
…service.ts (#1225) Fix issues in src/core/server/core_usage_data_service.ts. Change types of property docsCount,docsDeleted,storeSizeBytes and primaryStoreSizeBytes from 'string | undefined to 'number'. Issue Resolved: #1224 Partical Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Mar 5, 2022
…1223) 1.import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2.add support functions. for example, add a support function for converting a possibly not existant doc to an existant doc. 3.add @ts-expect-error to expected mismatches 4.fix undefined and mismatched types 5.fix unit tests in src/core/server/saved_objects Fix comments and modify import types Remove require_alias remove coreMigrationVersion to avoid bwc issue modify repository add param comments Issue Resolved: #1216 Partical Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Mar 5, 2022
add path in tsconfig.base.json to let nodejs types point to api/new.d.ts which is the new defined types Partially Resolved:#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Mar 5, 2022
1. import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2. remove asynSearch 3. apply type assertion 4. fix undefined and mismatched types Remove retry_call_cluster.test.ts due to removing all asyncSearch api Issue Resolved: #1193 Partical Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Mar 5, 2022
…service.ts (#1225) Fix issues in src/core/server/core_usage_data_service.ts. Change types of property docsCount,docsDeleted,storeSizeBytes and primaryStoreSizeBytes from 'string | undefined to 'number'. Issue Resolved: #1224 Partical Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
that referenced
this issue
Mar 5, 2022
…1223) 1.import Client from '@opensearch-project/opensearch/api/new' to hook up the new types 2.add support functions. for example, add a support function for converting a possibly not existant doc to an existant doc. 3.add @ts-expect-error to expected mismatches 4.fix undefined and mismatched types 5.fix unit tests in src/core/server/saved_objects Fix comments and modify import types Remove require_alias remove coreMigrationVersion to avoid bwc issue modify repository add param comments Issue Resolved: #1216 Partical Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Mar 12, 2022
1.change @elastic/elasticsearch to @opensearch-project/opensearch 2.add path in tsconfig.base.json to let nodejs types point to api/new.d.ts which is the new defined types 3.fix hookup issues in src/core/server/opensearch 4.fix hookup issues in src/core/server/core_usage_data_service.ts 5.fix hookup issues in src/core/server/saved_objects Issue Resolved: opensearch-project#1193 Issue Resolved: opensearch-project#1224 Issue Resolved: opensearch-project#1216 Partical Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
7 tasks
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Mar 12, 2022
1.change @elastic/elasticsearch to @opensearch-project/opensearch 2.add path in tsconfig.base.json to let nodejs types point to api/new.d.ts which is the new defined types 3.fix hookup issues in src/core/server/opensearch 4.fix hookup issues in src/core/server/core_usage_data_service.ts 5.fix hookup issues in src/core/server/saved_objects Sub-Issue Resolved: opensearch-project#1193 Sub-Issue Resolved: opensearch-project#1224 Sub-Issue Resolved: opensearch-project#1216 Issue Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Mar 18, 2022
1.change @elastic/elasticsearch to @opensearch-project/opensearch 2.add path in tsconfig.base.json to let nodejs types point to api/new.d.ts which is the new defined types 3.fix hookup issues in src/core/server/opensearch 4.fix hookup issues in src/core/server/core_usage_data_service.ts 5.fix hookup issues in src/core/server/saved_objects fix PR comments and add more explains to type mismatch Sub-Issue Resolved: opensearch-project#1193 Sub-Issue Resolved: opensearch-project#1224 Sub-Issue Resolved: opensearch-project#1216 Issue Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
ananzh
added a commit
to ananzh/OpenSearch-Dashboards
that referenced
this issue
Mar 18, 2022
1.change @elastic/elasticsearch to @opensearch-project/opensearch 2.add path in tsconfig.base.json to let nodejs types point to api/new.d.ts which is the new defined types 3.fix hookup issues in src/core/server/opensearch 4.fix hookup issues in src/core/server/core_usage_data_service.ts 5.fix hookup issues in src/core/server/saved_objects fix PR comments and add more explains to type mismatch Sub-Issue Resolved: opensearch-project#1193 Sub-Issue Resolved: opensearch-project#1224 Sub-Issue Resolved: opensearch-project#1216 Issue Resolved: opensearch-project#837 Signed-off-by: Anan Zhuang <[email protected]>
kavilla
pushed a commit
that referenced
this issue
Mar 23, 2022
1.change @elastic/elasticsearch to @opensearch-project/opensearch 2.add path in tsconfig.base.json to let nodejs types point to api/new.d.ts which is the new defined types 3.fix hookup issues in src/core/server/opensearch 4.fix hookup issues in src/core/server/core_usage_data_service.ts 5.fix hookup issues in src/core/server/saved_objects fix PR comments and add more explains to type mismatch Sub-Issue Resolved: #1193 Sub-Issue Resolved: #1224 Sub-Issue Resolved: #1216 Issue Resolved: #837 Signed-off-by: Anan Zhuang <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tasks
PR: [nodejs client] hookup js client with dashboards #1181
Issue: [nodejs client] hookup issues in src/core/server/saved_objects #1216
PR: [nodejs client] fix hookup issues in src/core/server/saved_objects #1223
Issue: [nodejs client] hookup issues in src/core/server/core_usage_data #1224
PR: [nodejs client] fix hookup issues in src/core/server/core_usage_data_service.ts #1225
Issue: [nodejs client] hookup issues in src/core/server/opensearch #1193
PR: [nodejs client] fix hookup issues in src/core/server/opensearch #1194
yarn osd bootstrap
worksPR: [nodejs client] modify tsconfig to route types to new.d.ts #1255
Issue: [nodejs client] Integration test passing #1245
Issue: [nodejs client] Functional tests passing #1246
Describe the bug
We forked nodejs client (repo here) from v7.14 and delete all the non-oss api between v7.10 to v7.14. nodejs client v7.14 is not compatible with current Dashboards due to type change.
For example, below is the indices.get defined in nodejs v7.14:
which is different from its definition in nodejs v7.10:
If we refers to @opensearch-project/opensearch and change all the client from KibanaClient to OpenSearchDashboardsClient, we could see type undefined errors from bootstrap. Below is one example:
To Reproduce
1)
yarn add @opensearch-project/opensearch
2) search @elastic/elasticsearch in non package.json files and replace it with @opensearch-project/opensearch
3) go to
src/core/server/saved_objects/migrations/core/opensearch_index.ts
change KibanaClient to OpenSearchDashboardsClientImpact to Plugins
The major change brought by new opensearch-js client is that the api types are looser ( here ) than the original ( here ) . For example, comparing how bulk api is previously defined as
While in the new.d.ts, the bulk api is now changed to:
Since it is a looser typed client, we don’t see much breaking changes in the dashboards code base. Most changes are related to type fixes which should not affect plugin owners. For most plugins, they use client interact with data plugin. For index management plugin, it uses Client defined in /src/core/server/opensearch/legacy. Though this client is imported from 'elasticsearch' but this is actually "@types/elasticsearch": "^5.0.33" from here. Currently, we don’t plan to change the legacy server and client.
To sum up, we don’t see breaking changes for plugins. I listed some steps to try using anomaly-detection below. SInce we are still fixing the PRs, could try with my test branch. However, since none of the plugins are using opensearch/opensearch-dashboards 2.0 or bump the node&package version accordingly, it is hard to evaluate the full impact. I would highly suggest that plugins bump to version 2.0 with node v14 and upgraded packages. Use the below steps to hook up with the opensearch-dashboards. Run all the unit tests, integration tests, and sanity tested the plugin.
Anomaly Detection build & run steps
./gradlew build
in anomaly-detection directory./gradlew :run
to run a single node cluster with anomaly-detection plugin<rootDir>/plugins
for OpenSearch Dashboards with the nodejs client hooked upyarn osd bootstrap
inside of OpenSearch Dashboards<rootDir>
<rootDir>/plugins/anomaly-detection-dashboards-plugin/opensearch_dashboards.json
from "1.3.0" to "2.0.0"<rootDir>/config/opensearch_dashboards.yml
and add "openserch.ignoreVersionMismatch: true" in this config file. This is because plugin is still using v1.3.0 while dashboards is v2.0.0. This line will ignore the version mismatch check (OpenSearch-Dashboards/src/core/server/opensearch/version_check/ensure_opensearch_version.ts
Line 167 in 8951429
yarn start
inside of OpenSearch Dashboards and verify anomaly-detection plugin is running upRunning anomaly-detection:
Unit test results:
Integration test results:
Expected behavior
Update Dashboards in 2.0 with type changes
OpenSearch Version
2.0
Dashboards Version
2.0
Plugins
plugins also need to update the types
The text was updated successfully, but these errors were encountered: