Skip to content

upgrade to node14#924

Closed
DarshitChanpura wants to merge 5 commits intoopensearch-project:mainfrom
DarshitChanpura:update/upgrade-to-node14
Closed

upgrade to node14#924
DarshitChanpura wants to merge 5 commits intoopensearch-project:mainfrom
DarshitChanpura:update/upgrade-to-node14

Conversation

@DarshitChanpura
Copy link
Member

Description

Makes changes to work with Node 14.18.2

Category

Maintenance

Why these changes are required?

OpenSearch Darshboards 2.0 is using Node@14.18.2 and thus this change is required for the plugin.

Issues Resolved

#875

Testing

  1. Checkout OpenSearch Dashboards main branch
  2. Clone security plugin repo inside plugins folder
  3. Run tests.

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…atible with node14

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
@DarshitChanpura
Copy link
Member Author

yarn run lint:es && yarn run lint:sass and yarn test:jest_ui pass successfully.

$ yarn run lint:es && yarn run lint:sass 

yarn run v1.22.17
$ node ../../scripts/eslint
✨  Done in 2.93s.
yarn run v1.22.17
$ node ../../scripts/sasslint
✨  Done in 1.26s.
$ yarn test:jest_ui

Test Suites: 57 passed, 57 total
Tests:       310 passed, 310 total
Snapshots:   43 passed, 43 total
Time:        21.386 s, estimated 24 s
Ran all test suites.
✨  Done in 23.98s.

yarn test:jest_server fails and I'm investigating

Stacktrace for one of the failing tests
start OpenSearch Dashboards server › anonymous disabled

    Client request error

      at ClientRequest.onError (plugins/security-dashboards-plugin/node_modules/@hapi/wreck/lib/index.js:191:36)

 FAIL  test/jest_integration/multi_tenancy.test.ts
  ● Console

    console.log
      Starting OpenSearchDashboards server..

      at Object.<anonymous> (plugins/security-dashboards-plugin/test/jest_integration/multi_tenancy.test.ts:57:13)

    console.error
      Unhandled error

      at process.uncaught (node_modules/jest-jasmine2/build/jasmine/Env.js:241:19)
      at process.emit (node_modules/source-map-support/source-map-support.js:495:21)

    console.error
      ConnectionError: connect ECONNREFUSED 127.0.0.1:9200
          at ClientRequest.<anonymous> (/Documents/amazon/codebase/OpenSearch-Dashboards/node_modules/@elastic/elasticsearch/lib/Connection.js:132:18)
          at ClientRequest.emit (events.js:400:28)
          at TLSSocket.socketErrorListener (_http_client.js:475:9)
          at TLSSocket.emit (events.js:400:28)
          at emitErrorNT (internal/streams/destroy.js:106:8)
          at emitErrorCloseNT (internal/streams/destroy.js:74:3)
          at processTicksAndRejections (internal/process/task_queues.js:82:21)

      at process.uncaught (node_modules/jest-jasmine2/build/jasmine/Env.js:242:19)
      at process.emit (node_modules/source-map-support/source-map-support.js:495:21)

    console.error
      Unhandled error

      at process.uncaught (node_modules/jest-jasmine2/build/jasmine/Env.js:241:19)
      at process.emit (node_modules/source-map-support/source-map-support.js:495:21)

    console.error
      Error: unknown error
          at respond (/Documents/amazon/codebase/OpenSearch-Dashboards/node_modules/elasticsearch/src/lib/transport.js:351:15)
          at checkRespForFailure (/Documents/amazon/codebase/OpenSearch-Dashboards/node_modules/elasticsearch/src/lib/transport.js:306:7)
          at HttpConnector.<anonymous> (/Documents/amazon/codebase/OpenSearch-Dashboards/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
          at ClientRequest.wrapper (/Documents/amazon/codebase/OpenSearch-Dashboards/node_modules/lodash/lodash.js:4991:19)
          at ClientRequest.emit (events.js:400:28)
          at TLSSocket.socketErrorListener (_http_client.js:475:9)
          at TLSSocket.emit (events.js:400:28)
          at emitErrorNT (internal/streams/destroy.js:106:8)
          at emitErrorCloseNT (internal/streams/destroy.js:74:3)
          at processTicksAndRejections (internal/process/task_queues.js:82:21)

      at process.uncaught (node_modules/jest-jasmine2/build/jasmine/Env.js:242:19)
      at process.emit (node_modules/source-map-support/source-map-support.js:495:21)

    console.error
      Unhandled error

      at process.uncaught (node_modules/jest-jasmine2/build/jasmine/Env.js:241:19)
      at process.emit (node_modules/source-map-support/source-map-support.js:495:21)

    console.error
      ConnectionError: connect ECONNREFUSED 127.0.0.1:9200
          at ClientRequest.<anonymous> (/Documents/amazon/codebase/OpenSearch-Dashboards/node_modules/@elastic/elasticsearch/lib/Connection.js:132:18)
          at ClientRequest.emit (events.js:400:28)
          at TLSSocket.socketErrorListener (_http_client.js:475:9)
          at TLSSocket.emit (events.js:400:28)
          at emitErrorNT (internal/streams/destroy.js:106:8)
          at emitErrorCloseNT (internal/streams/destroy.js:74:3)
          at processTicksAndRejections (internal/process/task_queues.js:82:21)

      at process.uncaught (node_modules/jest-jasmine2/build/jasmine/Env.js:242:19)
      at process.emit (node_modules/source-map-support/source-map-support.js:495:21)

@DarshitChanpura
Copy link
Member Author

DarshitChanpura commented Mar 22, 2022

PS: The PR checks can be validated only after main is bumped to 2.0. #928

@DarshitChanpura DarshitChanpura marked this pull request as ready for review March 22, 2022 21:01
@DarshitChanpura DarshitChanpura requested a review from a team March 22, 2022 21:01
@DarshitChanpura DarshitChanpura changed the title Update/upgrade to node14 upgrade to node14 Mar 22, 2022
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
@DarshitChanpura
Copy link
Member Author

Closing this PR as these changes are covered in: #928

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

Successfully merging this pull request may close these issues.

1 participant