tilt icon indicating copy to clipboard operation
tilt copied to clipboard

enable / disable considers resource dependencies

Open lizzthabet opened this issue 3 years ago • 2 comments

Describe the Feature You Want

Andy Martin on k8s slack says that their team has multiple resources that depend on other resources, so the enable/disable resource button in the UI may be misleading.

we have some services that require more to initialize than what can currently be done via the UI, so we'd like to avoid giving users the impression that these services can be enabled from the UI alone for now

If enabling and disabling resources took resource_deps into consideration, that would solve the main issue.

Andy added:

I think there's an additional complicating factor because resource_deps only goes in one direction (a depends on b but not vice versa) but it may not make sense to ever run b on its own

Current Behavior

If resource a depends on resource b:

  • enabling a will not also enable b. It will only enable a.
  • disabling b will not also disable a. It will only disable b.

Technically, you can make your own UIButtons that use the tilt enable and disable commands to enable/disable the appropriate resource dependencies. So (with the above example) you could tilt disable b && tilt disable a, but the UI doesn't display UIButtons on a disabled resource, so that workaround is moot when you need to (re)enable resources.

lizzthabet avatar Feb 09 '22 20:02 lizzthabet

Could there be a optional flag that allows enable/disable to cascade to dependencies? The tilt args command isn't a great alternative since it removes everything else that is running.

TimothyLoyer avatar Apr 14 '22 13:04 TimothyLoyer

This is an important feature for us as well.

When I enable a resource, I would expect for all of it's dependencies to come up as well.

tylermichael avatar Jun 17 '22 03:06 tylermichael