-
Notifications
You must be signed in to change notification settings - Fork 115
Touch crossdeps-builder clone step #1313
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
Conversation
When we only touch Ideally, we should do this:
|
@mthalman is this expected? I would have thought that if I touch crossdeps-builder, images which depend on it (like crossdeps-llvm) would get rebuilt too. This seems like it might be a bug.
That is expected - if we make changes to the LLVM toolchain, we want the images that depend on it to get rebuilt.
crossdeps-builder is a helper that contains build-time dependencies of the cross images that don't need to be part of the final images (llvm sources, llvm build dependencies, debootstrap, and the rootfs build scripts). crossdeps-llvm contains the runtime dependencies, including llvm, and serves as a base for the cross images - it's just the crossdeps image plus an install of llvm that we built in crossdeps-builder.
If we make an update to arcade, it should ideally rebuild all of the cross images. I agree it would be nice not to rebuild llvm. The arcade clone step comes after the llvm build which does locally allow reuse of the cached llvm build layer - except that our ci doesn't use a docker cache. I'd like to keep the current architecture where one arcade clone is shared by all of the cross images, otherwise they could get out of sync and have different arcade versions. If we really need to work around the caching limitations, maybe we can separate the arcade clone into a separate image that is based on crossdeps-builder, so that the ci cache picks it up? The current PR looks like it rebuilt llvm in only about 1h20m. I remember it used to take much longer, but I think 1h20m is an acceptable wait for the times we need to manually touch dockerfiles to flow arcade changes. |
I think there is a misunderstanding. Naming seem inverted. If the one with "llvm" in its name is building the actual llvm toolchian, it will remedy the confusion. The cross dockerfiles can use the new name (by updating their first line).
We can still achieve that by moving clone step to the middle layer (current: crossdeps-llvm, proposed: crossdeps-builder), then we don't need to rebuild llvm toolchain. It will rebuild the cross/ images only, which is better than touching multiple files.
Yes, it does seem unintentional / bug. For clarity, the first PR was #1306,, then we had to do another to rebuild the middle image #1309 because it wasn't built. |
The crossdeps-builder images contains more than just llvm - it has all the shared dependencies used to build the cross images. The (current) crossdeps-llvm image contains just the runtime cross-build dependencies plus llvm. Why is crossdeps-builder a better name for that one?
The layering is designed so that the final cross images contain just what's needed to build runtime. They intentionally exclude assets only used during the image construction (like arcade, debootstrap, and the llvm sources). Moving the clone step to crossdeps-llvm would violate this. |
Test to see what gets rebuilt when touching the arcade clone step