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 #1818

Merged
merged 15 commits into from
Oct 18, 2022
Merged

Node #1818

merged 15 commits into from
Oct 18, 2022

Conversation

Arri98
Copy link
Contributor

@Arri98 Arri98 commented Jun 7, 2022

Upated Node to latest LTS. Made minor changes to the ErizoAPI and updated mock-require because compatibility issues.

[] It needs and includes Unit Tests

Changes in Client or Server public APIs

[] It includes documentation for these changes in /doc.

@davidguv
Copy link

@Arri98
Several messages appear during execution

DeprecationWarning: Invalid 'main' field in '/opt/licode/erizo_controller/node_modules/node-getopt/package.json' of './lib'. Please either fix that or report it to the module author

jiangmiao/node-getopt#20

@xmartinez
Copy link

xmartinez commented Jul 14, 2022

This node update also updates npm:

npm --version
8.5.0

which uses a new package-lock.json file format[1] (introduced in npm v7).

[1] https://docs.npmjs.com/cli/v8/configuring-npm/package-lock-json#lockfileversion

Currently, the file is converted on every build and test execution:

npm install
(...)
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile

We should do the conversion once, and commit the format change as part of this PR. This will also reduce the noise on future dependency update PRs.

The file format can be converted using:

run npm install --package-lock-only --ignore-scripts --no-audit --no-fund

for all JS projects:

find . -name package-lock.json | sort
./erizoAPI/package-lock.json
./erizo_controller/package-lock.json
./extras/basic_example/package-lock.json
./node_modules/babel-code-frame/package-lock.json
./nuve/package-lock.json
./package-lock.json
./spine/package-lock.json
./test/package-lock.json

@Arri98 Could you update the PR with these changes, please?

Copy link

@xmartinez xmartinez left a comment

Choose a reason for hiding this comment

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

@Arri98 Looking good :-) Just a couple of nits, and the package-lock.json update (I think that it makes sense to address the file format change in this PR).

@@ -26,7 +26,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sinon": "^1.0.5",
"mocha": "^9.0.3",
"mock-require": "^1.3.0",
"mock-require": "^3.0.3",
Copy link

@xmartinez xmartinez Jul 14, 2022

Choose a reason for hiding this comment

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

We should also update package-lock.json, which can be done by running:

npm install --package-lock-only --ignore-scripts --no-audit --no-fund

(This will also update the file format, as mentioned in my previous comment).

@@ -1,7 +1,6 @@
/* global require, setInterval, clearInterval, exports */

/* eslint-disable no-param-reassign */

Choose a reason for hiding this comment

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

Nit: Can we remove this whitespace-only change? (It adds some noise to the PR).

@@ -157,6 +156,7 @@ if (global.config.erizoController.listen_ssl) {
}

server.listen(global.config.erizoController.listen_port);

Choose a reason for hiding this comment

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

Nit: Can we remove this whitespace-only change? (It adds some noise to the PR).

@xmartinez
Copy link

xmartinez commented Jul 14, 2022

@Arri98 @lodoyun We have been testing this change (applied to pre-v10.13) for a while.

We have performed a load test using a single stream with upto 1200 subscribers:

Screenshot from 2022-07-14 14-29-01

The load tests ran reliably. Also the CPU utilization of the ErizoJS of this PR (test_id=13) is very similar to the pre-v10.13 one (test_id=12):

Screenshot from 2022-07-11 15-51-06

The latter was expected, as the node version upgrade should only affect the control plane (the data plane is handled by the C++ implementation).

We have also been dogfooding the PR change using the new version in our internal meetings (also without a glitch).

@Arri98
Copy link
Contributor Author

Arri98 commented Jul 18, 2022

Updated lockfiles and removed the whitespaces in the erizo_controlle file

Copy link
Contributor

@lodoyun lodoyun left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thanks! 👍

@lodoyun lodoyun merged commit 92ece67 into lynckia:master Oct 18, 2022
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.

4 participants