tilt-dev / tilt

Define your dev environment as code. For microservice apps on Kubernetes.
https://tilt.dev/
Apache License 2.0
7.69k stars 303 forks source link

Attempt to randomize port on startup if default is unavailable #3434

Open rpocase opened 4 years ago

rpocase commented 4 years ago

When switching between tilt projects that contain tilt wrappers (e.g. make tilt) I'll often hit issues with port allocation issues. My options tend to be:

I'd like for tilt to have a (optional?) method to randomize port allocation if the default port is in use.

An alternative I've thought about is a tilt daemon/manager that is project context aware. Tilt could host its web-ui on the same port but provide subpaths for components running under different Tiltfile contexts (e.g. localhost:10350/project1, localhost:10350/project2).

wu-victor commented 4 years ago

Thanks @rpocase for the issue. Indeed folks often Tilt at the same time in multiple projects at that same time.

nicks commented 4 years ago

fwiw, i've been hitting this a lot myself recently. I too go back and forth if I actually want to have two separate tilt instances to keep track of, or rather if I want them to "join" together

The first one has a simpler mental model, but the second one seems more useful (particularly if we're able to crack the nut of sidebar organization when you have a lot of services)