tilt-dev / tilt-extensions

Extensions for Tilt
https://tilt.dev/
Apache License 2.0
201 stars 159 forks source link

feat(procfile): allow passing kwargs to local_resource #515

Closed Djiit closed 1 year ago

Djiit commented 1 year ago

Hi team,

Small change to allow passing kwargs to local_resource. Enable things like Labels or AutoInit=False on Procfile resources.

I'm not sure how to add tests, if needed. Happy to have some guidances.

Cheers

nicks commented 1 year ago

ya, can you add a test? if you put a test/test.sh script in the extension, the ci will pick it up. here's an example - https://github.com/tilt-dev/tilt-extensions/blob/master/local_output/test/test.sh

Djiit commented 1 year ago

Added some tests. I'm not sure how to debug the CI error. ./test.py --changed works on my machine :tm: :/

nicks commented 1 year ago

hmmm your test failed when i tried them. i believe the problem is that procman / tilt expects your procfile to run servers that don't exit, and treats exit as failure. try something like echo foo && sleep 100

Djiit commented 1 year ago

Alright, looks better now, thanks for the help :)