Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tilt down does not kill Tilt process #6340

Open
FFdhorkin opened this issue Mar 18, 2024 · 1 comment
Open

tilt down does not kill Tilt process #6340

FFdhorkin opened this issue Mar 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@FFdhorkin
Copy link

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.

@FFdhorkin FFdhorkin added the bug Something isn't working label Mar 18, 2024
@FFdhorkin
Copy link
Author

Potentially related: #5765 and #4288

@nicks nicks added enhancement New feature or request and removed bug Something isn't working labels Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants