Build the workspace default image for linux/arm64

What does this MR do and why?

Stage ③ of arm64 GitLab Workspaces (gitlab#550128): build the workspace default image (workspaces/ubuntu-24.04) for linux/arm64 in addition to linux/amd64.

  • .gitlab/ci/gitlab-workspaces.images.yml: PLATFORM: 'linux/arm64,linux/amd64' on .gitlab-workspaces-base. arm64 was removed in !936 (merged) to work around the emulated-build timeouts in #122. The reason given there was that nothing could use an arm64 workspace image while the injected editor was amd64-only (note). That is no longer true: 20261013232549-workspaces-tools is a multi-platform image with a natively built VS Code server (verification below).
  • scripts/install-conan: fixes a latent arm64 build failure. The script skipped non-amd64 targets but still ran conan --version afterwards, so the first arm64 build would have failed with conan: command not found after hours of emulated build. Conan only publishes self-contained Linux releases for x86_64, but it is pure Python, so arm64 now installs the same version from PyPI into its own virtual environment. The amd64 path is unchanged.
  • .gitlab/ci/qemu.yml: bumps QEMU_IMAGE from tonistiigi/binfmt:qemu-v10.0.4 to qemu-v10.2.3. The first parent pipeline run failed extracting jemalloc in install-ruby with Cannot open: Invalid argument. Under qemu 10.0.x, openat2() hands the kernel the guest's O_NOFOLLOW as O_LARGEFILE (qemu-project/qemu#3262 (closed)), and Ubuntu 24.04's GNU tar 1.35 creates every extracted file through openat2(). Reproduced locally across 9.2.2, 10.0.4, 10.1.3, 10.2.1 and 10.2.3 (details in this thread). Because qemu.yml changed, this MR's pipeline rebuilds every arm64 image, which is also the regression check for the bump.

Why both images have to be multi-platform before the Rails change

The tools injector copies the VS Code server into the workspace volume, and the main container runs it. The server's bundled node is dynamically linked against glibc, so it only starts when the main container image has the same architecture as the injected tools. If GitLab pinned the tools image by its index digest while the default devfile image stayed amd64-only, an arm64 node (for example Rancher Desktop on Apple Silicon, which the comment in ee/lib/remote_development/files.rb guards against) would inject an arm64 editor into an amd64 container. So the Rails change for stage ④ flips both pins at once, and it needs this image first.

Build time under emulation

This is the open question, and the reason arm64 was dropped originally. Since then, Python (built with --enable-optimizations, which runs a PGO training pass), Java and GCC were added while the image was amd64-only, so the arm64 leg of this build has never run under QEMU. The gitlab-workspaces-latest-tag job runs automatically in this MR's pipeline because the CI file changed. Could a maintainer run the pipeline in the parent project? Fork pipelines can't pull through the group dependency proxy.

If the arm64 leg doesn't fit under the 4h job timeout, the BuildKit step timings in the log will show which step to address. The likely candidates, from compile-heavy to light:

  1. Python PGO (install-python): skip --enable-optimizations for arm64 only, or use prebuilt CPython.
  2. PHP from source (install-php).
  3. Ruby + jemalloc from source (install-ruby). The ci/ images already build Ruby for arm64 under QEMU.

Moving the arm64 leg onto a native arm64 runner would remove the emulation cost entirely, but this repo has no native-runner pattern yet, so I'd rather measure first.

Testing

install-conan, run in python:3.13-bookworm containers:

Case Result
Original script, TARGETARCH=arm64 exit 127, conan: command not found (bug reproduced)
Fixed script, TARGETARCH=arm64 (PyPI path) Conan version 2.15.0; non-root user (uid 5001, as in the image) can run conan profile detect
Fixed script, TARGETARCH=amd64 (release tarball path) Conan version 2.15.0, unchanged behavior

Every Conan dependency resolves to a manylinux2014_aarch64 cp313 wheel (PyYAML, MarkupSafe, charset-normalizer) or a pure-Python wheel; patch-ng 1.18.1 is sdist-only but contains no compiled sources. So the arm64 install needs no compiler and stays fast under QEMU.

The other installers used by this image already handle arm64: install-golang (arm64 checksum for 1.23.12 in tool-versions.yml), install-node (the nodesource nodejs_23.9.0-1nodesource1_arm64.deb exists), install-java, install-rust and install-docker map TARGETARCH.

workspaces-tools multi-platform verification (index sha256:ec12f2a705dac25bc0aa6dcf80b01a5de35ece297a258e5677dc023c82ee7ef6): I extracted both platform variants and ran file(1) on every ELF in /tools. The linux/arm64 variant has all 10 ELF binaries ARM aarch64 (node, node-pty, spdlog, @parcel/watcher, kerberos, ripgrep rg, agentw, …), and linux/amd64 has all 10 x86-64. The highest referenced GLIBC_ symbol is 2.28 on both, so the documented glibc floor holds.

Follow-ups after this merges

  1. A maintainer runs the manual gitlab-workspaces-stable-release-tag job on master to publish a timestamped multi-platform tag.
  2. Stage ④: the GitLab MR pinning both the tools image and the default devfile image by their index digests (instead of the amd64 child-manifest digests Rails pins today), plus the docs update. A branch is ready: https://gitlab.com/gitlab-community/gitlab-org/gitlab/-/tree/550128-workspaces-arm64-images

Checklist

/cc @zhaochen_li @vtak

Related: !1111 (merged), !1168 (merged), gitlab-web-ide-vscode-fork!136 (merged)

🤖 Generated with Claude Code

Edited by Miguel Sacristan

Merge request reports

Loading
Loading