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
fix(server): ensure using a free port for dev console #5163
Conversation
@eysi09 should we use The |
How does the front end know to connect to this port? Do we store that info on the session? Or is this another different server? |
@TimBeyer we set it as |
Also print the error message and exit.
* Fail if the explicitly specified port is empty * Always retry on `EADDRINUSE` error if the port hasn't been specified explicitly * Always fail on any errno error expect `EADDRINUSE` * Log the port the server has started at
3651325
to
8bc0fba
Compare
Alternative port range makes so sense when `port` is specified: https://github.com/unjs/get-port-please
22a8eed
to
c84f80c
Compare
Now the tests are green |
cc @trymbill This has already been merged but wondering if the work you've been doing makes assumptions about ports? |
Desktop handles grabbing a free port by itself (see: https://github.com/garden-io/garden-platform/blob/61a0d724716a5324400bbe903af912aa4c8b3dd8/desktop/src-tauri/src/garden_core_process_manager.rs#L89-L95), so this shouldn't change anything on that end. |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Patches #4984
Fixes #5158
Special notes for your reviewer: