arm: use official Ubuntu images instead of osrf custom ones - #1521
Merged
Conversation
The arm64 debbuilder was pinned to the manually-maintained
osrf/ubuntu_arm64:${DISTRO} base images, built and pushed to Docker
Hub by hand.
The custom images were a 2016 workaround from before Docker offered
native multi-arch base images and cross-arch emulation. armhf was
already migrated off them (#647, #1135) using the official
ubuntu:${DISTRO} image plus --platform.
focal is EOL and no longer built, so its remaining osrf/ special
case for armhf is dead code. Drop it and handle both arm arches with
a single check:
- docker_generate_dockerfile.bash: armhf and arm64 share one case
using the official ubuntu:${DISTRO} base.
- docker_run.bash: pass --platform=linux/${ARCH} for both armhf and
arm64.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Jose Luis Rivero <jrivero@honurobotics.com>
Contributor
|
I've queued a build of gz-cmake5 arm64 on resolute
Just need for weekend schedule to end and an arm build machine to be re-added |
This was referenced Aug 6, 2026
j-rivero
added a commit
that referenced
this pull request
Aug 6, 2026
armhf and arm64 debbuilds are served by the same agents (one machine advertises both linux-armhf and linux-arm64). Since #1521 both arches also use the same base image, so their Dockerfiles became identical. Under the containerd image store a multi-arch FROM resolves to the manifest index digest, which is the same for every platform, and the legacy builder does not include --platform in its cache key. The two chains therefore collide: the second arch to build on a given agent adopts the first one's layers and keeps going on foreign-arch content until the first freshly executed COPY/ADD does a platform-checked lookup and aborts with: failed to get destination image "sha256:...": image with reference sha256:... was found but does not provide the specified platform (linux/arm64) Observed in gz-math9-debbuilder #386, an arm64 build that cache-hit steps 2-20 with image IDs identical to the armhf build #385 that had just run on the same agent, and went on to install 305 _armhf.deb before failing. Symmetrically in gz-tools2-debbuilder #3640, an armhf build that installed 59 _arm64.deb after arm64 build #3639; its retry #3641 landed on a fresh agent and passed. That agent-affinity is what makes the failure look flaky. Emit an arch-specific LABEL as the first instruction after FROM so the chains diverge immediately, restoring the pre-#1521 property that two architectures never share cached layers. It has to be first: placed any later, the earlier shared instruction would already have adopted a foreign-arch layer for the rest of the build to sit on. This works around the legacy builder only. Migrating the agents to BuildKit, which keys its cache by platform, is the durable fix. Fixes #1529 Assited-by: Opus 5 Signed-off-by: Jose Luis Rivero <jrivero@honurobotics.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The arm64 debbuilder was pinned to the manually-maintained osrf/ubuntu_arm64:${DISTRO} base images, built and pushed to Docker Hub by hand. The custom images were a 2016 workaround from before Docker offered native multi-arch base images and cross-arch emulation. armhf was already migrated off them (#647, #1135) using the official ubuntu:${DISTRO} image plus --platform.
Since Focal is EOL and no longer built, so its remaining osrf/ special case for armhf is dead code. Drop it and handle both arm arches with a single check.
Nowadays we are building images on native platforms so we can probably drop the platform argument for arm but I think that it does no hurt and it is robust if we decide to change to emulation at some point.
Assisted-By: Opus 4.8