dc_resource(auto_init=False): Unexpected Implicit Triggered Build/Runs
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
Expected Behavior
dc_resource(…, auto_init=False) should not get implicitly triggered if a file the Docker build depends on changes.
Current Behavior
The resource gets init'd/built/run unexpectedly when any of its Dockerfile deps change.
Steps to Reproduce
Repro: https://github.com/rwoll/tilt-trigger-too-much-repro#tilt-bug-unexpected-triggers
Context
tilt doctor Output
Tilt: v0.23.2, built 2021-12-03
System: darwin-amd64
---
Docker
- Host: [default]
- Server Version: 20.10.8
- 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.21.5
- Cluster Local Registry: none
---
About Your Use Case
We have a bunch of non-core services that have common dependencies like ./deps/example.txt in the repro repo. For compute and speed, we don't want them init'd/trigger'd by default, so we configure them with auto_init=False. However, they are getting triggered consistently, and unexpectedly when the common deps change. This causes lots of containers to built at once and slows down seeing the core container get the change in question.
Thanks for taking a look/read! As always, we ❤️ Tilt and appreciate your time!
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 behavior from the linked tilt-trigger-too-much-repro case, focusing on dc_resource(auto_init=False) when a Dockerfile dependency changes. Trace the trigger path for that resource and verify that dependency changes no longer implicitly initialize, build, or run it while auto_init is false.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100