tilt icon indicating copy to clipboard operation
tilt copied to clipboard

force restart does not rebuild image

Open nhomble opened this issue 3 years ago • 3 comments

Expected Behavior

Given a resource from docker_compose that points to a Dockerfile, I expected the restart button to rebuild my image.

Current Behavior

The same image is restarted.

Steps to Reproduce

  1. used the button described in https://blog.tilt.dev/2019/11/14/force-update.html
  2. found similar discussion in GH-1012

Context

tilt doctor Output

$ tilt doctor
Tilt: v0.30.5, built 2022-07-14
System: darwin-arm64
---
Docker
- Host: unix:///var/run/docker.sock
- Server Version: 20.10.14
- API Version: 1.41
- Builder: 2
- Compose Version: v2.5.1
Thanks for seeing the Tilt Doctor!
Please send the info above when filing bug reports. 💗

About Your Use Case

As I was developing my image, I was adding new files to my image (passed as a volume). On a restart, I wasn't seeing the changes.

My Tiltfile is minimal

docker_compose('docker-compose.yml')

Where the docker-compose.yml looks like

version: '3.9'
services:
  svc:
    build: ./thing

My workaround is to:

  1. disable my resource
  2. enable my resource
  3. restart

nhomble avatar Aug 04 '22 14:08 nhomble

thanks for filing! ya, i think this might just be an oversight

nicks avatar Aug 05 '22 18:08 nicks

Happy to help out as well! I'm a big fan of tilt @nicks

nhomble avatar Aug 06 '22 02:08 nhomble

This is a big one for me.

Additionally, it seems like this is part of the same issue. When I click the force restart button, the logs do not reattach. When I click disable/enable like nhomble suggested, the logs DO reattach.

mleiter06 avatar Aug 23 '22 22:08 mleiter06