-
Notifications
You must be signed in to change notification settings - Fork 288
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
Parallel build does not wait for base image #2855
Comments
We don't support deps from image to image. We do allow deps from resource to resource, using |
hey @gaetansnl, following up: yes, this is great feature request! I want to clarify that resource dependencies will only really be useful on the first build. (i.e. resource dependencies only enforce that resource A must be ready before resource B builds for the first time; but do NOT enforce that, when resource A rebuilds, resource B must then rebuild as well.) As a hack, you might consider:
with this tiltfile, the local resource defined at the top would build your base image at the beginning of your tilt run. nothing here would stop the image from rebuilding 3x on a change to I don't know when we'll be able to implement good support for base images + parallel updates, so in the meantime you can use a hack like the above or turn off parallel updates ( Note for Tilt Team: the lightest-weight technical solution is probably to add a filter to |
OK, with the latest Tilt release, the scheduler won't try to parallelize two deployments that have the same base image. But it will still repeat the builds. I'm going to leave this open for the general case of skipping the redundant builds entirely. |
@nicks any updates regarding redundant builds? |
@kollender Nope, we're still scoping out possible solutions. This is currently difficult to solve without a major internal rearchitecture or some clever idea. |
@nicks , the major internal rearchitecture you will need is to change the list of build objects from graph flattened into a list via a topological sort into a tree-like structure where every node in the graph has a reference to the items blocking it. Your code: https://github.com/windmilleng/tilt/blob/master/pkg/model/target_graph.go#L5 Example implementation from another project: https://github.com/thought-machine/please/blob/dc22858f1e067bdf3f9ce79cea5ac1a2edae63c7/src/core/graph.go#L17 Both projects also use starlark to mark these dependencies, so there should be a lot of overlap in codebases. |
unfortunately, we had to roll the fix for this back 😭 |
rolled forward a fix in #3553 that i feel a lot better about |
I'm building an image B and then 5 images based on B for performance reason.
Since parallel builds are enabled, it seems that B is build 3 times instead of one.
An option to specify dependencies for
docker_build
andcustom_build
would be great. Or maybe is there is an existing solution ?Thank you
The text was updated successfully, but these errors were encountered: