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

Node.js v18 Compatibility Test for [ml-commons-dashboards] #183

Closed
Tracked by #4058
ananzh opened this issue May 17, 2023 · 11 comments
Closed
Tracked by #4058

Node.js v18 Compatibility Test for [ml-commons-dashboards] #183

ananzh opened this issue May 17, 2023 · 11 comments
Assignees

Comments

@ananzh
Copy link
Member

ananzh commented May 17, 2023

Introduction

As part of our continued efforts to improve OpenSearch Dashboards, we are planning to upgrade the underlying Node.js version from v14 to v18. This change will enhance performance, add new features, and bolster security. However, such major version changes might also affect the compatibility of existing plugins. Here is more introduction: opensearch-project/OpenSearch-Dashboards#3601.

Therefore, we kindly request assistance in testing this plugin the compatibility of with this new version of Node.js. We've prepared a branch with the Node.js v18 upgrade, which you can find here:
https://github.com/AMoo-Miki/OpenSearch-Dashboards/tree/node-18-webpack-4

Steps to Proceed

  • If you think your plugin won't be affected by OpenSearch Dashboards Node.js upgrade. Pls ignore the rest steps and close the issue directly.
  • Pull the provided branch that includes the Node.js v18 upgrade and OpenSearch 3.0.0.
  • Hook up your plugin with the updated OpenSearch Dashboards.
  • Run your existing test suites and perform manual testing as necessary.
  • If no issues are encountered, feel free to close this issue.
  • If there are any problems, report them in this issue thread and also link them in the overall OpenSearch Dashboards Node.js upgrade issue thread Upcoming Transition to Node.js v18: Plugin Compatibility Test Required Overall Issue OpenSearch-Dashboards#4058
    The purpose of linking any questions or issues back to the main issue is to maintain visibility and transparency among all plugin owners. A problem encountered by one plugin might also affect others. This shared knowledge base will foster collaborative problem-solving and prevent duplication of effort.

We appreciate your support and cooperation in ensuring a smooth transition to Node.js v18 for the entire OpenSearch Dashboards community.

@wanglam
Copy link
Collaborator

wanglam commented May 22, 2023

Hi @ananzh , we will test the compatibility according above steps. Will paste the testing result here after finished.

@wanglam wanglam self-assigned this May 22, 2023
@wanglam
Copy link
Collaborator

wanglam commented May 22, 2023

Hi @ananzh , I've tested the ml-commons-dashboards plugin based updated OSD branch, ml-commons main branch and ml-commons-dashboards main branch.
The plugin was work fine in my chrome browser
image

But when I test in cypress, I got an error like this:
image
The plugin can't be open in the cypress environment. It's work with 2.x branch. Is there any suggestions about that issue?

@ananzh
Copy link
Member Author

ananzh commented May 22, 2023

The official Node.js 18 PR raised in OSD: opensearch-project/OpenSearch-Dashboards#4071

@ananzh
Copy link
Member Author

ananzh commented May 22, 2023

@wanglam Cypress should work with Node.js 18.x and above. Is this in functional test repo or in ml? Could you give me some reproduce steps?

@ananzh
Copy link
Member Author

ananzh commented May 22, 2023

@wanglam I used a plain OpenSearch and opensearch-project/OpenSearch-Dashboards#4071 to run the cypress test from the functional test repo. I picked one example from vis-builder, and it works well:

Screenshot 2023-05-22 at 10 52 15

Then I tried to use ml-commons-dashboards. I first git download ml-common in the plain OpenSearch. But got this error when run ./gradlew run:

ubuntu@ip-172-31-55-237:~/work/OpenSearch$ ./gradlew run

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/home/ubuntu/work/OpenSearch/plugins/ml-commons/build.gradle' line: 55

* What went wrong:
A problem occurred evaluating project ':plugins:ml-commons'.
> Could not read script '/home/ubuntu/work/OpenSearch/build-tools/repositories.gradle' as it does not exist.

Could you help me on that? Meanwhile from vis-builder test, seems no issue with loading. You could clean cache or re-start your laptop to re-try it.

@ananzh
Copy link
Member Author

ananzh commented May 22, 2023

opensearch-project/OpenSearch-Dashboards#4071 support node 14, 16 and 18. Pls test on node 18.

nvm install 18.16.0
nvm use 18.16.0

@ananzh
Copy link
Member Author

ananzh commented May 22, 2023

Since I am not able to run ml-common success, to check the loading issue, I picked another plugin anomaly-detection and just verify the loading on the functional test repo and it seems work well

Screenshot 2023-05-22 at 16 30 50

Would like some reproducing step to help.

@wanglam
Copy link
Collaborator

wanglam commented May 23, 2023

Hi @ananzh , Thanks for helping me investigate this issue.
It seems the issue only occurs in my local environment. I've tested the plugin in the remote ubuntu.
image
The results show all test cases was passed. I think we can close this issue.

@ananzh
Copy link
Member Author

ananzh commented May 23, 2023

@wanglam I also figure it out my issue. I didn't put ml_commons_dashboards.enabled: true in opensearch_dashboards.yml file so ml is not running. I didn't find this config in the DEVELOPER.md but then see it from opensearch.org doc. Here is the cypress test result:

Screenshot 2023-05-23 at 11 59 42

@ananzh
Copy link
Member Author

ananzh commented May 23, 2023

@wanglam just want to double check that have you use 18.16.0? Cuz @AMoo-Miki 's PR supports node 14 to 18. So you need to specifically use Node.js 18 (v18.16.0) .

I will close the issue. If you r not using Node.js 18 and find issues with that, just re-open it.

@ananzh ananzh closed this as completed May 23, 2023
@wanglam
Copy link
Collaborator

wanglam commented May 24, 2023

@ananzh I've double check in the remote ubuntu, I am running in 18.16.0. There is no issue about the cypress and unit tests in the current main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants