-
Notifications
You must be signed in to change notification settings - Fork 15
Improve port lookup #187
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
Improve port lookup #187
Conversation
Release version 4.3.0
ezewer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comment as to remove chai, rest looks good!
src/helpers/__test__/ports.spec.js
Outdated
| @@ -0,0 +1,100 @@ | |||
| 'use strict' | |||
|
|
|||
| const { assert } = require('chai') | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer avoiding chai and doing tests in a different way.
Example assert.ok(_.isObject(res)
)
package.json
Outdated
| "devDependencies": { | ||
| "@mapbox/node-pre-gyp": "1.0.6", | ||
| "app-builder-bin": "4.1.0", | ||
| "chai": "4.3.7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer avoiding chai
ezewer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
This PR improves the lookup of the free ports for the backend side of the app and fixes the issue: #171
The issue is the following:
Windows 10have all possible security features enabled, it is using Virtualization-based Security, this one is running on top Hyper-VDockerandHyper-Vreserve some ranges of ports, eg:100attempts until finding a free port or throwing an errorThe current implementation defines the following ports:
And uses get-port module which provides better behavior for ports lookup. It will use any element in the preferred ports array if available, otherwise fall back to a random port
Basic changes:
express-port-requiredlayout due to adding the port lookup for itelectronLoadCustomEventhttps://github.com/ZIMkaRU/bfx-report-electron/blob/feature/improve-port-lookup/src/trigger-electron-load.js#L7 -> https://github.com/ZIMkaRU/bfx-report-ui/blob/feature/improve-port-lookup/src/utils/triggerElectronLoad.jsDepends on this PR:
Waiting for the corresponding frontend implementation of using the free port lookup flow of the express API on the backend side