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

[Hookup osd 2.0] AnnotationDomainTypes does not exists in @elastic/charts #222

Closed
ananzh opened this issue Mar 31, 2022 · 1 comment · Fixed by #230
Closed

[Hookup osd 2.0] AnnotationDomainTypes does not exists in @elastic/charts #222

ananzh opened this issue Mar 31, 2022 · 1 comment · Fixed by #230
Labels
bug Something isn't working untriaged

Comments

@ananzh
Copy link
Member

ananzh commented Mar 31, 2022

Describe the bug
See any errors for all AnnotationDomainTypes imports. For example, /anomaly-detection-dashboards-plugin/public/pages/AnomalyCharts/containers/AnomalyDetailsChart.tsx

import {
  AnnotationDomainTypes,

will show the following error

'"@elastic/charts"' has no exported member named 'AnnotationDomainTypes'. Did you mean 'AnnotationDomainType'?ts(2724)
specs.d.ts(691, 22): 'AnnotationDomainType' is declared here.

Then after hookup with OSD 2.0 and solved 400 Bad Request issue click create detector --> create a detector --> after detector initializing stage is done, click it. NO concept is shown.

Screen Shot 2022-03-30 at 11 13 09 PM

To Reproduce
Run OpenSearch 2.0 with AD engine 2.0
Clone AD Dashboards current main (v1.3) to OpenSearch Dashboards plugins folder
Modify packages.json (delete the packages that have the compatibility issue):

"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.0.4"
Change opensearchDashboardsVersion to 2.0.0 in opensearch_dashboards.json
Run yarn osd bootstrap and yarn start in OpenSearch Dashboards
After solve the 400 Bad Request issue, click create detector --> create a detector --> after detector initializing stage is done, click it. NO concept is shown.

Expected behavior
No issue

Plugins
AD

@ananzh ananzh added bug Something isn't working untriaged labels Mar 31, 2022
@ananzh
Copy link
Member Author

ananzh commented Mar 31, 2022

AnnotationDomainTypes does not exists due to @elastic/charts upgrade. This is the breaking change. AnnotationDomainType is the one used in @elastic/charts.

Two ways to change:

  1. a quick fix, change AnnotationDomainTypes to
 AnnotationDomainType as AnnotationDomainTypes
  1. use AnnotationDomainType and modify all the places use AnnotationDomainTypes

Then detector is rendered out

Screen Shot 2022-03-30 at 11 14 13 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
1 participant