TBD54566975 / ftl

FTL - Towards a 𝝺-calculus for large-scale systems
https://tbd54566975.github.io/ftl/
Apache License 2.0
21 stars 7 forks source link

Add `ftl dev --background-after-deploy` or alter existing `--background` to have this behaviour #1168

Open alecthomas opened 6 months ago

alecthomas commented 6 months ago

This is typically what I want to do in shell scripts eg.

ftl dev --background-after-deploy .
trap "ftl dev --stop --no-serve" EXIT ERR SIGINT
ftl call foo.bar
wesbillman commented 6 months ago

It's an extra command, but we can use serve as well.

ftl serve --background
trap "ftl serve --stop" EXIT ERR SIGINT
ftl deploy .
ftl call foo.bar
alecthomas commented 6 months ago

We're getting rid of serves though IIRC

stuartwdouglas commented 2 months ago

I had a look at this, and it needs some way for the background process to signify that it is done deploying to the outer process that launched it. I don't think we want to open a socket or declare a new service just for this, so I am not really sure what the best approach is here. Maybe an extra field on the controller status to indicate that all initial dev deployments are done, but that also feels a bit yuck.