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

feat(server): add transportMode #2116

Merged
merged 8 commits into from Aug 8, 2019

Conversation

knagaitsev
Copy link
Collaborator

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

Yes, based on moving around and changing existing clientMode and serverMode tests

Motivation / Use-Case

#1860

This replaces clientMode and serverMode options with the usage:

transportMode: {
  server: 'ws',
  client: 'ws'
}

Breaking Changes

Experimental options clientMode and serverMode removed

Additional Info

  • transportMode-option.test.js is bulky and maybe should be broken down
  • the configuration I added into Server.js could definitely be moved into some unified updateOptions helper to be tested more easily.

this.log.warn(
'clientMode is an experimental option, meaning its usage could potentially change without warning'
'transportMode is an experimental option, meaning its usage could potentially change without warning'
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can move this in util, like getTransportMode(options: object): object

Copy link
Member

@alexander-akait alexander-akait 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, need fix CI problems

@codecov
Copy link

codecov bot commented Jul 11, 2019

Codecov Report

Merging #2116 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2116      +/-   ##
==========================================
+ Coverage   94.56%   94.59%   +0.02%     
==========================================
  Files          32       32              
  Lines        1215     1221       +6     
  Branches      340      344       +4     
==========================================
+ Hits         1149     1155       +6     
  Misses         64       64              
  Partials        2        2
Impacted Files Coverage Δ
lib/Server.js 97.19% <100%> (+0.03%) ⬆️
lib/utils/getSocketClientPath.js 88.88% <100%> (ø) ⬆️
lib/utils/getSocketServerImplementation.js 90.47% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bdf8444...cdcb7af. Read the comment docs.

@codecov
Copy link

codecov bot commented Jul 11, 2019

Codecov Report

Merging #2116 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2116      +/-   ##
==========================================
+ Coverage   96.07%   96.08%   +<.01%     
==========================================
  Files          34       34              
  Lines        1224     1227       +3     
  Branches      346      349       +3     
==========================================
+ Hits         1176     1179       +3     
  Misses         47       47              
  Partials        1        1
Impacted Files Coverage Δ
lib/Server.js 97.33% <100%> (-0.02%) ⬇️
lib/utils/getSocketClientPath.js 100% <100%> (ø) ⬆️
lib/utils/normalizeOptions.js 100% <100%> (ø) ⬆️
lib/utils/getSocketServerImplementation.js 90.47% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 460f15a...aa17f7c. Read the comment docs.

hiroppy
hiroppy previously approved these changes Jul 15, 2019
@knagaitsev
Copy link
Collaborator Author

knagaitsev commented Jul 15, 2019

@evilebottnawi @hiroppy What is the cause of the Lint npm audit problem? I have seen it running other CI builds as well.

@alexander-akait
Copy link
Member

@Loonride i think we need update package-json.lock

@hiroppy
Copy link
Member

hiroppy commented Jul 15, 2019

I created a pr which updated package-lock.json. #2123

@knagaitsev knagaitsev dismissed stale reviews from alexander-akait and hiroppy via 0858045 July 23, 2019 15:05
@knagaitsev knagaitsev force-pushed the transportMode-option branch 2 times, most recently from 0858045 to 84daa27 Compare July 23, 2019 20:45
@alexander-akait
Copy link
Member

alexander-akait commented Jul 30, 2019

/cc @Loonride something wrong with CI 😕 Looks need update snapshots or not

@knagaitsev
Copy link
Collaborator Author

@evilebottnawi Looks like unlucky e2e test run. Maybe there is a way to let jest run concurrently for all other tests, but then run e2e one at a time? Now that I look at it, I see Client.test.js and Progress.test.js are nearby each other in the test run failures, and they are both editing the same file, which should be changed. I will send another PR to improve it.

@alexander-akait
Copy link
Member

/cc @Loonride what is status, i think we should merge this PR and do release

@knagaitsev
Copy link
Collaborator Author

@evilebottnawi Ready for merge.

@alexander-akait
Copy link
Member

@Loonride we need something any for CI fix?

This was referenced Jun 6, 2021
@mend-for-github-com mend-for-github-com bot mentioned this pull request Aug 18, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsoc Google Summer of Code scope: ws(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants