Tilt watches files which should be ignored
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
Steps to Reproduce
Using:
- Tilt v0.23.2
- macOS v12.0.1
- Docker Desktop v4.3.0
- Kubernetes v1.22.4
- Apple M1 Pro
Demonstration using https://github.com/tilt-dev/ignore-examples:
git clone https://github.com/tilt-dev/ignore-examples
cd ignore-examples
tilt up
Then edit service-a/ignored-by-tiltignore.txt.
Expected Behavior
service-a does not rebuild after editing the file.
Current Behavior
service-a rebuilds:

$ tilt get filewatches
NAME CREATED AT
configs:(Tiltfile) 2021-12-10T18:02:55Z
image:ignore-examples-service-a 2021-12-10T18:02:55Z
image:ignore-examples-service-b 2021-12-10T18:02:55Z
$ tilt get filewatches image:ignore-examples-service-a -o yaml
apiVersion: tilt.dev/v1alpha1
kind: FileWatch
metadata:
annotations:
tilt.dev/resource: ignore-examples-service-a
tilt.dev/target-id: image:ignore-examples-service-a
creationTimestamp: "2021-12-10T18:02:55Z"
name: image:ignore-examples-service-a
ownerReferences:
- apiVersion: tilt.dev/v1alpha1
blockOwnerDeletion: true
controller: true
kind: Tiltfile
name: (Tiltfile)
uid: 868df0fa-e7ec-457d-b6cc-78cb7c8d2bed
resourceVersion: "13"
uid: f1d700dd-cd08-4f8f-8219-476d0a5028af
spec:
disableSource:
configMap:
key: isDisabled
name: ignore-examples-service-a-disable
ignores:
- basePath: /Users/spencerelliott/dev/tilt-dev/ignore-examples/Tiltfile
- basePath: /Users/spencerelliott/dev/tilt-dev/ignore-examples/service-a
patterns:
- ignored-by-docker-build-ignore.txt
- basePath: /Users/spencerelliott/dev/tilt-dev/ignore-examples/service-a
patterns:
- ignored-by-dockerignore.txt
- basePath: /Users/spencerelliott/dev/tilt-dev/ignore-examples
patterns:
- '*/ignored-by-tiltignore.txt'
watchedPaths:
- /Users/spencerelliott/dev/tilt-dev/ignore-examples/service-a
status:
disableStatus:
disabled: false
lastUpdateTime: "2021-12-10T18:04:00Z"
reason: ConfigMap/key "ignore-examples-service-a-disable"/"isDisabled" is false
fileEvents:
- seenFiles:
- /Users/spencerelliott/Dev/tilt-dev/ignore-examples/service-a/not-ignored.txt
- /Users/spencerelliott/Dev/tilt-dev/ignore-examples/service-a/not-ignored.txt
time: "2021-12-10T18:03:37.169397Z"
- seenFiles:
- /Users/spencerelliott/Dev/tilt-dev/ignore-examples/service-a/ignored-by-tiltignore.txt
- /Users/spencerelliott/Dev/tilt-dev/ignore-examples/service-a/ignored-by-tiltignore.txt
time: "2021-12-10T18:04:00.568557Z"
lastEventTime: "2021-12-10T18:04:00.568557Z"
monitorStartTime: "2021-12-10T18:02:55.686026Z"
Context
tilt doctor Output
$ tilt doctor
Tilt: v0.23.2, built 2021-12-03
System: darwin-arm64
---
Docker
- Host: [default]
- Server Version: 20.10.11
- API Version: 1.41
- Builder: 2
- Compose Version: v1.29.2 (build 5becea4c)
---
Kubernetes
- Env: docker-for-desktop
- Context: docker-desktop
- Cluster Name: docker-desktop
- Namespace: default
- Container Runtime: docker
- Version: v1.22.4
- Cluster Local Registry: none
---
Thanks for seeing the Tilt Doctor!
Please send the info above when filing bug reports. 💗
The info below helps us understand how you're using Tilt so we can improve,
but is not required to ask for help.
---
Analytics Settings
--> (These results reflect your personal opt in/out status and may be overridden by an `analytics_settings` call in your Tiltfile)
- User Mode: opt-in
- Machine: 938838b4a4ce47d9bf52a35bdddad34d
- Repo: c36Oy9zA0hHsxmvf2r+9jw==
About Your Use Case
This is a minimal repro of a problem which is affecting our main repo, which contains Kubernetes host path volumes in a directory (repo)/volumes. These files are configured to be ignored by Git, Docker, and Tilt, but Tilt is watching the files and triggering unnecessary rebuilds, causing errors and slowing down our development.
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 by reproducing the issue with the tilt-dev/ignore-examples repository, then inspect the FileWatch output from tilt get filewatches image:ignore-examples-service-a -o yaml. Done means editing service-a/ignored-by-tiltignore.txt no longer rebuilds service-a while non-ignored changes still trigger the expected rebuild.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, kubernetes
- Domain
- devops, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100