You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running two resources, first one using a Dockerfile extending from the second, second using Dockerfile that is the base for the first one. Both resources, the one using the base image and the one extending the base image should deploy without an error.
Current Behavior
First resource builds the base image
STEP 1/5 — Building Dockerfile: [x/tilt-deployment-base]
Building Dockerfile for platform linux/amd64:
...
First resource skips pushing the base image to repository:
STEP 2/5 — Pushing x/tilt-deployment-base:tilt-c284e86bc661040f
Skipping push: base image does not need deploy
The resource using the base image fails due to missing image (masked the registry and namespace from the log output):
Tracking new pod rollout (tilt-deployment-base-6dc4c5d649-pjncq):
┊ Scheduled - <1s
┊ Initialized - <1s
┃ Not Ready - (ContainersNotReady): containers with unready status: [tilt-deployment-base]
[event: pod x/tilt-deployment-base-6dc4c5d649-pjncq] Pulling image "xxx/tilt-deployment-base:tilt-c284e86bc661040f"
[event: pod x/tilt-deployment-base-6dc4c5d649-pjncq] Failed to pull image "xxx/tilt-deployment-base:tilt-c284e86bc661040f": rpc error: code = NotFound desc = failed to pull and unpack image "xxx/tilt-deployment-base:tilt-c284e86bc661040f": failed to resolve reference "xxx/tilt-deployment-base:tilt-c284e86bc661040f": xxx/tilt-deployment-base:tilt-c284e86bc661040f: not found
Steps to Reproduce
This issue can be somewhat hard to reproduce, as it feels like it's related to some race-condition.
I can consistently reproduce it with the following steps, by adding a local_resource with a sleep command and setting the resource_deps in a way that the base-image resource builds later.
$ tilt doctor
Tilt: v0.33.22, built 2025-01-03
System: linux-amd64
---
Docker
- Host: unix:///var/run/docker.sock
- Server Version: 27.4.1
- API Version: 1.47
- Builder: 2
- Compose Version: v2.28.1
---
Kubernetes
- Env: kind
- Context: kind-kind
- Cluster Name: kind-kind
- Namespace: default
- Container Runtime: containerd
- Version: v1.32.0
- Cluster Local Registry: &RegistryHosting{Host:localhost:5001,HostFromClusterNetwork:,HostFromContainerRuntime:,Help:https://kind.sigs.k8s.io/docs/user/local-registry/,SingleName:,}
---
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-out
- Machine: 8a6cac578b8f7d68ec08cb2f39a8a246
- Repo: IdDstfTxPu7tcDfMm9XZvA==
About Your Use Case
Use case is the ability to run the base image and see it live, while also being able to extend from it and have the changes into base image propagate into child-resources that use it.
During Tilt startup, this can be mitigated by defining resource_deps in a way that the images build in correct order, but when making changes to the images and updating the resources live, it's possible the build order is incorrect.
The text was updated successfully, but these errors were encountered:
thanks for the report! as a temporary workaround, i think if you set up the resource_deps so that the manifest with the base image gets deployed first, i think it will work ok.
Thanks for the reply! Setting resource_deps does indeed help when running tilt up, but doesn't help when the resources are already up, and we make changes to files that cause image rebuilds.
Expected Behavior
Running two resources, first one using a Dockerfile extending from the second, second using Dockerfile that is the base for the first one. Both resources, the one using the base image and the one extending the base image should deploy without an error.
Current Behavior
Steps to Reproduce
This issue can be somewhat hard to reproduce, as it feels like it's related to some race-condition.
I can consistently reproduce it with the following steps, by adding a local_resource with a sleep command and setting the resource_deps in a way that the base-image resource builds later.
Files to reproduce the issue with: test.tar.gz
Run
tilt up
Context
tilt doctor
OutputAbout Your Use Case
Use case is the ability to run the base image and see it live, while also being able to extend from it and have the changes into base image propagate into child-resources that use it.
During Tilt startup, this can be mitigated by defining resource_deps in a way that the images build in correct order, but when making changes to the images and updating the resources live, it's possible the build order is incorrect.
The text was updated successfully, but these errors were encountered: