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

SocketIO update to 4.5.0 #1817

Merged
merged 21 commits into from
Nov 10, 2022
Merged

SocketIO update to 4.5.0 #1817

merged 21 commits into from
Nov 10, 2022

Conversation

Arri98
Copy link
Contributor

@Arri98 Arri98 commented Jun 7, 2022

Updated socketIO to version 4.5.0 as the 2.4.0 was deprecated. For this the google-closure-compiler had to be updated as the new version of SocketIO used JS features that the compiler didn't support.

[Yes] It needs and includes Unit Tests

Updated test to account for changes in the socketIO API.

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

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 :-)

We should update package lock files, too, but it might be better to wait until #1818 has been merged, so we can base this PR on the new lock file format.

I noticed that spine also uses the socket.io-client library. It might make sense to update it also in this PR (so that perftest are in sync with erizo).

@@ -15,8 +15,8 @@
"node-getopt": "~0.3.2",
"prom-client": "~11.2.1",
"sdp-transform": "~2.14.0",
"socket.io": "~2.4.0",
"socket.io-client": "~2.4.0",
"socket.io": "~4.5.0",

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.

@@ -15,7 +15,7 @@
"eslint-plugin-jsx-a11y": "^5.1.0",
"eslint-plugin-react": "^7.1.0",
"expose-loader": "~0.7.5",
"google-closure-compiler-js": "~20170521.0.0",
"google-closure-compiler": "~20220502.0.0",

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.

@xmartinez
Copy link

@Arri98 @lodoyun We have been testing this change (rebased on the nodejs upgrade, PR #1817) for a while.

We have performed a load test using a single stream with up to 1200 concurrent subscribers:

Screenshot from 2022-07-28 18-34-16

and have observed no signalling issues.

We have also been dogfooding the change in our internal environment, which exposes it to a higher variety of browser/OS combinations (Win/Linux/Mac, Chrome/Firefox/Safari). No issues have been observed, either.

@xmartinez
Copy link

@Arri98 @lodoyun We have detected some issues related to these upgrade on our staging and prod environments. We are still investigating the problem. I will comment on this PR once we have more details.

Until we root cause and fix the problem, we do not recommend merging this PR.

@Arri98
Copy link
Contributor Author

Arri98 commented Sep 7, 2022

Some events (https://socket.io/docs/v4/emit-cheatsheet/) and event error handling (https://socket.io/docs/v3/migrating-from-2-x-to-3-0/#a-middleware-error-will-now-emit-an-error-object) changed from v2 to v3 and caused issues when a socket disconnected. I will update this PR after solving the issues.

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 👍

@@ -24,8 +24,8 @@ const erizoTasks = (gulp, plugins, config) => {
.pipe(plugins.sourcemaps.init())
.pipe(plugins.closureCompiler({
warning_level: 'QUIET',
languageIn: 'ECMASCRIPT6',
languageOut: 'ECMASCRIPT5',
languageIn: 'ECMASCRIPT_2017',
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

log.warning(`message: socket error, id: ${that.id}, state: ${that.state.toString()}, error: ${err}`);
reliableSocket.on('connect_error', (err) => {
// Fired when an namespace middleware error occurs.
log.warning(`message: connect_error error, id: ${that.id}, state: ${that.state.toString()}, error: ${err}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@lodoyun lodoyun merged commit 7c16621 into lynckia:master Nov 10, 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.

3 participants