tilt
tilt copied to clipboard
UI for tilt args
Describe the Feature You Want
It would be nice to be able to pass args to tilt from the UI to change config args on the fly.
Current Behavior
Currently, we hack around this with UI button that invokes tilt args -- --foo bar under the hood, but it's kinda hard since it's not additive and loses state of the rest of the args and is very much a UI hack.
Why Do You Want This?
Something we do that’s been nice is, we have a ui-proxy resource. It’s a barebones go reverse proxy (~50 lines of go’s standard library), that based on an environment variable, switches to proxying to the Tilt-run API (local), or remote dev+staging environments with more full data. Then, we’ve wired up UI Buttons in the Tilt UI that lets you click and switch between which env we are proxying to for the UI’s backend! (Under the hood the button invokes tilt args -- --ui-mode <local|dev|staging>)
When we switched to fully local development, we realized we don't have great seed data especially for UI dev, so being able to proxy to a remote dev/staging API is great.
thanks for the request, @rwoll! right now, using the cmd_button extension is the best workaround for changing tilt args via the ui dashboard. we're working on the ability to enable and disable resources (which can also be defined through tilt args) in the ui, but this doesn't cover your use-case of changing user-defined arguments!
it's not additive and loses state of the rest of the args
as of v23.2, running tilt args without any arguments will open up the current list of args in your $EDITOR (#5241). i know that (again) isn't the perfect solution for your team, but i'll mention it because it's a new functionality change that isn't yet documented.
just for our record-keeping, i'd say this is related to other feedback we've gotten, like #4671, #4039, #3258, and #3432. cc: @SurbhiSGupta
Thanks @lizzthabet!
I came across this issue because I was trying to do the same thing as @rwoll, use a cmd_button to update the Tilt args.
What I am experiencing is the args command is making some change which is breaking the button for subsequent runs.
cmd_button(name='nav-cdk',
argv=['sh', '-c', 'tilt args -- --lifecycle_name $LIFECYCLE_NAME --env_name $ENV_NAME'],
text='CDK',
location='nav',
icon_svg=read_file('sysops/tilt/aws.svg'),
inputs=[
text_input('LIFECYCLE_NAME', label='lifecycle deployment name', placeholder='dev-0', default='good-dev-0'),
text_input('ENV_NAME', label='personal cdk environment name', placeholder=os.environ["USER"], default=''),
]
What I am experiencing is the args command is making some change which is breaking the button for subsequent runs.
Thanks for the report! I've filed this as #5541.