shutdown commands
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
Describe the Feature You Want
Not all commands handle signals properly.
When using local_resource(serve_cmd), there could be a way to add custom shutdown logic that's more complex than normal process signal handling
Current Behavior
Currently, tilt creates a process group for each serve_cmd.
When it's time to shutdown, Tilt sends a sigint then a sigkill to that process group.
Why Do You Want This?
This came up when someone was trying to run localstack
docker run --rm --name sqs -p 4566:4566 -e "SERVICES=sqs" localstack/localstack
Fortunately, localstack has a workaround for this use-case so that it handles signals properly!
docker run --rm --name sqs -p 4566:4566 -e "SERVICES=sqs" -e "SET_TERM_HANDLER=true" localstack/localstack
note the SET_TERM_HANDLER bit
Though this is not an option for some containers.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the local_resource(serve_cmd) implementation and trace how Tilt creates process groups and sends SIGINT and SIGKILL during shutdown. Review the existing signal-handling path, then define and implement custom shutdown behavior for cases such as containers that do not handle signals; done means the behavior is testable for the localstack scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- devops, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100