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

Migrate plugin to be compatible with OpenSearch Dashboards #1

Merged
merged 13 commits into from
Apr 12, 2021

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Apr 8, 2021

This PR migrates the plugin to be compatible with OpenSearch Dashboards, and be able to work with the OpenSearch Anomaly Detection plugin. Compatible with OpenSearch Dashboards 7.10.2.

Major changes include:

  • Change plugin name (as written in package.json and as shown in the url via browser) from opendistro-anomaly-detection-kibana -> anomaly-detection-dashboards
  • Change artifact name from opendistroAnomalyDetectionKibana -> anomalyDetectionDashboards
  • Updated README with new name changes + updated and tested new links
  • Mentions of Kibana changed to OpenSearch Dashboards
  • Mentions of ES/Elasticsearch changed to OpenSearch
  • Mentions of kbn changed to osd
  • Mentions of odfe to opensearch
  • Updated links (to other pages within the plugin, to Discover page, etc.) & made sure they worked
  • Updated KibanaRequest / IKibanaResponse to OpenSearchDashboardsRequest / IOpenSearchDashboardsResponse, respectively
  • Changed app category from Open Distro for Elasticsearch to OpenSearch Plugins (this is not a finalized change)

What works:

  • All unit tests passing
  • All integration tests passing
  • Additional sanity test of plugin functionality by creating/starting/stopping/deleting detectors

What doesn't work:

  • Integration test & CD GitHub workflows - OpenSearch artifacts are not published yet.
  • Integration with alerting - will need to be tested after the OpenSearch + Dashboards plugins have been migrated

@ohltyler ohltyler added the enhancement New feature or request label Apr 8, 2021
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some remaining opendistro's that we might not want. Would search the codebase for more.

ODFE_VERSION: 1.13.1
AD_KIBANA_PLUGIN_NAME: opendistroAnomalyDetectionKibana
AD_OPENSEARCH_DASHBOARDS_PLUGIN_NAME: opendistroAnomalyDetectionOpenSearchDashboards
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be anomalyDetectionOpenSearchDashboards or even anomalyDetectionDashboards?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking a look. Regarding the remaining opendistros and plugin name: I believe there is nothing finalized here regarding plugin naming convention changes, so have just simply replaced Kibana with OpenSearchDashboards for now. I was also told there is no change of branding for opendistro for now, which is why I have left it for now. Let me reach out again to get some clarification on this.

Copy link
Member Author

@ohltyler ohltyler Apr 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dblock have changed the plugin name (as seen in the url) to anomaly-detection-dashboards, and build zip to anomalyDetectionDashboards, and have removed remaining mentions of opendistro/ open-distro / Open Distro for Elasticsearch, with a few exceptions:

  • Sample detectors and corresponding indices: this will be a very involved change that will affect current users if we change these names, lots to consider regarding backwards compatibility, etc. Will consider this in a follow-up PR. Have created Update sample detectors names & indices #3 to track)
  • Release notes - will leave these as-is until a new standard format is decided upon in the future
  • Links to documentation (currently still using opendistro website for this)
  • References to backend indices, which will be changed in the future
  • Left all references to odfe for now until there is a new standard acronym

Have re-ran all unit & integration tests; sanity tested workflows via browser.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. I'll re-read the PR for typos.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only question I have is around ODFE that you called out above, for things like volume names in docker containers. Isn't that just becoming opensearch? I don't think it makes sense to continue abbreviating that to, say, os, that would be super confusing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dblock as discussed, we will not have a separate acronym for OpenSearch, and can replace odfe with opensearch. Have made those changes in the latest commit. Re-ran tests + did another round of sanity testing, looks good. No remaining instances of odfe besides release notes.

Copy link
Contributor

@ylwu-amzn ylwu-amzn Apr 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ohltyler Except for the sample detectors, we need to consider migrating all AD ODFE indices to open search ? And change ODFE AD URL /_opendistro/_anomaly_detection to /_opensearch/_anomaly_detection.

Do we have some issue to track these? It needs both backend and frontend changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we need to call some alerting APIs like search alerts, remember to change this part once alerting API changes done.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the changes regarding indices / api changes from opendistro -> opensearch is being treated as a separate step. Current efforts are to make the ODFE plugins compatible with OpenSearch / OpenSearch Dashboards first.

.github/workflows/e2e-tests-workflow.yml Outdated Show resolved Hide resolved
.cypress/utils/constants.ts Outdated Show resolved Hide resolved
.eslintrc Outdated Show resolved Hide resolved
…to anomalyDetectionDashboards; remove most instances of opendistro / open distro
README.md Show resolved Hide resolved
@ylwu-amzn
Copy link
Contributor

Should we change the ODFE doc link now? Like this one : https://github.com/opendistro-for-elasticsearch/anomaly-detection-kibana-plugin/blob/main/public/pages/AnomalyCharts/components/AlertsFlyout/AlertsFlyout.tsx#L89
Not sure if we have migrated ODFE docs or not.

@ohltyler
Copy link
Member Author

Should we change the ODFE doc link now? Like this one : https://github.com/opendistro-for-elasticsearch/anomaly-detection-kibana-plugin/blob/main/public/pages/AnomalyCharts/components/AlertsFlyout/AlertsFlyout.tsx#L89
Not sure if we have migrated ODFE docs or not.

We have not. I was told we are ok to continue referencing the Open Distro docs for now.

@ylwu-amzn
Copy link
Contributor

ylwu-amzn commented Apr 12, 2021

Do we plan to keep ODFE repo in future? If yes, will we commit any bug fix/patch to it or just keep it immutable? If not, should we remove or modify the ODFE issue link in code and release code?

@ohltyler
Copy link
Member Author

Do we plan to keep ODFE repo in future? If yes, will we commit any bug fix/patch to it or just keep it immutable? If not, should we remove or modify the ODFE issue link in code and release code?

Yes, bug fixes may be backported to the Open Distro repo for current users. The issues and projects can be moved to this repo once it is public to move community development focus here.

Copy link

@yizheliu-amazon yizheliu-amazon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for the change.

Copy link
Contributor

@ylwu-amzn ylwu-amzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the change!

@ohltyler ohltyler merged commit 9050115 into opensearch-project:main Apr 12, 2021
@ohltyler ohltyler deleted the rename branch April 12, 2021 22:09
uses: actions/checkout@v2
with:
path: kibana/plugins/anomaly-detection-kibana-plugin
path: OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin
Copy link
Member

@dblock dblock Apr 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have been lower-case opensearch-dashboards? It's a path.

Copy link
Member Author

@ohltyler ohltyler Apr 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When cloning the repo via the checkout action, the dir is OpenSearch-Dashboards, which is different than the cloned Kibana repo which was just kibana. Will confirm if it needs to be changed once these workflows are runnable.

@ohltyler ohltyler mentioned this pull request Jul 21, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants