The Linux debbuilders still build with the legacy Docker builder.
Beyond the announced removal, the legacy builder does not include --platform in its layer-cache key. Combined with the containerd image store — where a multi-arch FROM resolves to the manifest index digest, identical for every platform — two builds for different architectures on the same agent share their whole cache chain. That is the root cause of #1529: an arm64 job adopted an armhf job's layers and installed 305 _armhf.deb before dying at the first freshly executed COPY.
#1529 was worked around by emitting an arch-specific LABEL as the first instruction after FROM, which keeps the chains apart. That fixes the symptom for the arch axis only; the cache remains platform-blind for anything else that might collide.
BuildKit keys its cache by platform and is the durable fix.
Work involved
Related
The Linux debbuilders still build with the legacy Docker builder.
Beyond the announced removal, the legacy builder does not include
--platformin its layer-cache key. Combined with the containerd image store — where a multi-archFROMresolves to the manifest index digest, identical for every platform — two builds for different architectures on the same agent share their whole cache chain. That is the root cause of #1529: anarm64job adopted anarmhfjob's layers and installed 305_armhf.debbefore dying at the first freshly executedCOPY.#1529 was worked around by emitting an arch-specific
LABELas the first instruction afterFROM, which keeps the chains apart. That fixes the symptom for the arch axis only; the cache remains platform-blind for anything else that might collide.BuildKit keys its cache by platform and is the durable fix.
Work involved
docker-buildx-pluginon the Linux agents (chef-osrf).DOCKER_BUILDKIT=1for thedocker buildcall injenkins-scripts/docker/lib/docker_run.bash— note it runs undersudo, so the variable needssudo -Eor to be passed explicitly.Step N/Mmarkers and buffersRUNoutput differently; confirm the# BEGIN SECTION/# END SECTIONgreps and the Naginator retry regexes injenkins-scripts/dsl/_configs_/Globals.groovystill match.osrf.build.archLABEL workaround from arm* debbuilds can fail to get image with specified platform #1529 can be dropped.Related
does not provide the specified platform