tilt icon indicating copy to clipboard operation
tilt copied to clipboard

tiltfile: add ability to specify resources to disable on startup

Open landism opened this issue 2 years ago • 0 comments

Describe the Feature You Want

something like `config.set_disabled_resources(['foo', bar'])

Current Behavior

One can:

  1. config.set_enabled_resources(['every', 'other', 'resource', 'but', 'foo', 'and', 'bar']), but that's going to have problems staying in sync with the actual list of other resources
  2. local_resource('disable_foo_and_bar', 'tilt disable foo bar'), but that's pretty hacky. You need to define it above foo and bar in the Tiltfile, to ensure foo and bar are disabled before they try to build (and even then, it might be a bit racy), and you probably also want to have it disable itself (e.g. tilt disable foo bar disable_foo_and_bar), so that it's not showing up in your list of resources, but then you get an error on startup because disabling itself causes its own build to fail.

Why Do You Want This?

A user asked for this on Slack. I didn't ask for further context since it seems pretty reasonable to want to define a list of disabled resources rather than enabled.

landism avatar Feb 25 '22 19:02 landism