Closed serraramiro1 closed 3 months ago
A possible way of tracking package dependencies changes without tracking everything, is only copy package.xml files from the repo, ignoring every other file that rosdep doesn't care about.
That presumes that every package in LAMBKIN will be a ROS package. That's an unnecessary requirement. lambkin-shepherd
isn't, nor it needs to be.
The problem lies, as you point out, in the integration between docker
and ansible
. We use docker
images as our binary distribution format. We use ansible
for arbitrarily complex image provisioning. But ansible
is bound to a single image layer, and since docker
can't know what will ansible
do with package sources, it is forced to invalidate that image layer whenever anything changes.
The ideal solution would be to split every ansible
task into its own image layer. That's what ansible-bender
is supposed to do. Alternatively, we could drop ansible
and use a different mechanism for image provisioning. I don't know of any better suited tool.
We're bringing the big guns (aka @erasmomontes) to solve this fun containerized distribution problem.
Bug description
As the title states, a change to any file of lambkin repository, will invalidate the most expensive step of the building process, and thus make the user spend more than an hour rebuilding it. (Also related to #62 ). This is originated by the way we're mouting the repository for installation.
Snippet from root
Dockerfile
:Platform:
lambkin
version:11312538a7ae3fa3155ca28de0fc64f7e6b6517a
How to reproduce
1- Cd to lambkin's root directory. 2- Build some base docker image.
3- Create a random file
4- Run the build command again
Expected behavior
The build immediately finishes since it hit the cache
Actual behavior
The build will start from the step mentioned above.
Additional context
A possible way of tracking package dependencies changes without tracking everything, is only copy
package.xml
files from the repo, ignoring every other file thatrosdep
doesn't care about. @nahueespinosa for context.