tilt-dev / tilt-dev/tilt

tilt down does not kill Tilt process

Open
#6,340 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Description

Expected Behavior

I expected tilt down to shut down Tilt, not just delete resources that tilt up created

While I can see there may be use cases for tilt down not shutting down Tilt itself, I feel like most of these cases would be relegated to the use case of only running a group of services or cases where Tilt is being run in the foreground.

So I would propose one of the following:

  • tilt down detects whether tilt is running in the background or not. If it's in the background, kill Tilt itself. Otherwise, leave Tilt running until user hits CTRL+C.
  • tilt down (without services/groups) always both removes resources and kills Tilt itself
    • tilt down a would maintain current behavior & not kill Tilt, even if nothing remained (e.g. Tilt started with tilt < /dev/null > /dev/null up a & had been used to start Tilt)
    • Alternatively, tilt down always kills Tilt, regardless of whether you provided a service/group, and there could be a tilt down [service/group] --keepalive, though I don't see how this is better than conditional behavior based on whether service(s)/group(s) are provided
  • add a new tilt stop, tilt kill, or tilt shutdown command: effectively as a built-in alias for tilt down && pkill tilt
  • tilt up detects an idle Tilt using the same Tiltfile already running and reuses the port (this seems less than ideal, but has the smallest behavioral change)
Current Behavior

tilt down deletes resources, but leaves tilt running.

Steps to Reproduce
  1. Run tilt up
  2. In another terminal, run tilt down
  3. Nothing is shown in terminal 1; Tilt continues to run even though there are no active resources
  4. If you happened to be running Tilt in the background, the next time you use tilt up, you get an error about the port being in use
Context
tilt doctor Output
$ tilt doctor
Tilt: v0.33.11, built 2024-02-15
System: linux-amd64
---
Docker
- Host: unix:///var/run/docker.sock
- Server Version: 25.0.3
- API Version: 1.44
- Builder: 2
- Compose Version: v2.24.5-desktop.1
---
Kubernetes
- Env: eks
- Context: arn:aws:eks:us-west-2:**********
- Cluster Name: arn:aws:eks:us-west-2:**********
- Namespace: default
- Cluster Local Registry: none
---
About Your Use Case

As I mentioned in #4288 , because there's no daemon, there's also no tidy way to kill Tilt if you run it in the background via tilt < /dev/null > /dev/null up &

So if you do a mock daemon mode using the above, you have to do tilt down && pkill tilt which is quite tedious/verbose for a fairly common command.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Reproduce the background workflow with tilt up and tilt down, then inspect the existing down-command and process-lifecycle behavior. Before coding, get a maintainer decision on the competing shutdown semantics; done should include the chosen behavior and coverage for foreground, background, and service-specific commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go, kubernetes
Domain
cli, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.