Skip to content

Automatically select available port for session and launch_session #478

@isaacwaldron

Description

@isaacwaldron

📝 Description of the feature

If the default port 50051 is not available, launch_session with port_num=None will fail to launch a session. Instead, it could search for an available port and launch the session there. The same logic could be applied to session to allow port_num=None there as well.

💡 Steps for implementing the feature

  1. Implement a test that demonstrates the failure described above.
  2. Implement a function find_available_port that finds an open port on localhost to open a listening socket on and returns the port number
  3. Modify launch_session and session to call find_available_port when port_num=None

🔗 Useful links and references

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions