tilt-dev / tilt-dev/tilt

dc_resource(auto_init=False): Unexpected Implicit Triggered Build/Runs

Open
#5,286 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.