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 does not support incremental builds #6332

Open
remod opened this issue Mar 12, 2024 · 0 comments
Open

Tilt does not support incremental builds #6332

remod opened this issue Mar 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@remod
Copy link

remod commented Mar 12, 2024

Expected Behavior

I'd expect Tilt to allow incremental builds (see "About Your Use Case") same as the docker build CLI:

Build command:

docker build --tag docker.example.com/project/image:latest .

Self-referencing dockerfile:

...
COPY --from=docker.example.com/project/image:latest /lib /lib
...

Current Behavior

The docker build CLI does not have an issue with the self-referencing dockerfile. It just pulls the latest version of the image the COPY command requires from the CI's registry and then starts the build.

However, when using docker_build() in Tilt I get an error:

getting image build info for service: Image dependency cycle: docker.example.com/project/image:latest

Steps to Reproduce

(The cycle detection looks like a consciously integrated and unit tested feature, hence I believe it is clear how to reproduce it. If not, please let me know!)

Context

tilt doctor Output

$ tilt doctor
Tilt: v0.33.11, built 2024-02-15
System: linux-amd64
---
Docker (cluster)
- Host: tcp://192.168.49.2:2376
- Server Version: 24.0.7
- API Version: 1.43
- Builder: 2
---
Docker (local)
- Host: unix:///var/run/docker.sock
- Server Version: 25.0.3
- Version: 1.44
- Builder: 2
- Compose Version: v2.24.6
---
Kubernetes
- Env: minikube
- Context: minikube
- Cluster Name: minikube
- Namespace: default
- Container Runtime: docker
- Version: v1.28.3
- 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: 39fbf492702fe92fd21f2f3f95e0c377
- Repo: ilwzMX3bpG4n/TVLO/2yHg==
...

About Your Use Case

We have a large C++ code base and plan to switch to container-based development & deployment using Kubernetes.

The idea is that our CI periodically creates a development docker image where all binaries are prebuilt. When building the next version of the image, the developer or the next CI job pulls the latest existing image from the CI's repository and just build the delta. This procedure seems to be common practice and is describe in the section "Building incrementally" from this blog.

Of course the image originally has to be bootstrapped in the CI. But now as the image exists, both docker builds (local and CI) should pull the latest existing image from the CI's repository enabling incremental builds.

@remod remod added the bug Something isn't working label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant