Open PumpkinSeed opened 2 weeks ago
we did a bunch of user research and prototyping on behavior like this when we first implemented 'disabled resources'. we never found a solution we really liked. But we're totally supportive of people taking a crack at it.
there's basically 4 common patterns that are worth mentioning:
tilt ci
) where you only want to use the state from the command-lineall of that said: if you wanted to try implementing this, I'd probably do it like this:
uiresource
for changes, sort of like we do in this shell script - https://github.com/tilt-dev/tilt-extensions/blob/b2193c9554e48234b3de6441587fbea32556ed34/cancel/cancel_btn_controller.sh#L18uiresource
changes, write all the enabled resources to a fileconfig.set_enabled_resources()
with the contents of the filedoes that make sense?
(open to making it a native feature, just thinking thru the best way to start prototyping something)
Thanks @nicks, I'm on holiday but as soon as I get back to my computer I will read it carefully and write a plan.
start as a tilt extension
That was my first thought, but I couldn't get notification about the UI change. I didn't know about this shell script, I will check it.
Describe the Feature You Want
We have a decent amount of services across a few Tiltfiles of our multiple systems. Each time I change between systems I have to individually disable resources what I don't want to run in that particular system. That would be nice to somehow persist that information. First I thought
--output-snapshot-on-exit
will do that for me, but I tried it and resources came up again.Current Behavior
If I disable a resource, that will came back after "Down and Up" again.
Why Do You Want This?
That would make it lot easier to change between systems.
Additional context I tried to write an extension for this by using the
config.clear_enabled_resources()
andconfig.set_enabled_resources(...)
, but I couldn't get information about the status of the services. If there would be aconfig.get_resources()
, maybe I can get it periodically and save the state into a file.If I just missed something can you direct me to the right direction how should I add this behavior? Otherwise that would be nice to add a flag for that just like how the
--output-snapshot-on-exit
works. If you point me to the direction I can work on it once we have an established plan for the implementation.