Closed SajidAlamQB closed 2 weeks ago
hey @SajidAlamQB , can we not increment the port number here, directly, if 4141 is occupied, go to 4142, if that is occupied which is it always, go to 4143?
maybe we put a specific range from 4141, to 4145, and if all the ports in this range are busy, then they tell us which one through --port.
maybe we put a specific range from 4141, to 4145, and if all the ports in this range are busy, then they tell us which one through --port.
This is a good middle approach we definitely can do.
@SajidAlamQB , thanks for this , will review this once tests are passing, can we also add unit-testing to this, if we can mock ports being occupied ?
Description
Related to: https://github.com/kedro-org/kedro-viz/issues/2052
If there is an existing Kedro Viz server running, kedro viz run will redirect the browser to that one when a second instance of kedro viz is launched using the same port and the error message from uvicorn is missed.
Development notes
Check that the port is in use before running the server and increment it until a max 5 times to find an alternative free port, if none are found send error message to users no free ports available and suggest them to use
--port
.QA notes
Checklist
RELEASE.md
file