Skip to content

ruby parametric: drop linux/amd64 platform pin#6987

Draft
bm1549 wants to merge 1 commit into
mainfrom
brian.marks/ruby-parametric-dockerfile-arm64
Draft

ruby parametric: drop linux/amd64 platform pin#6987
bm1549 wants to merge 1 commit into
mainfrom
brian.marks/ruby-parametric-dockerfile-arm64

Conversation

@bm1549
Copy link
Copy Markdown
Contributor

@bm1549 bm1549 commented May 20, 2026

Motivation

The Ruby parametric Dockerfile is the only one in utils/build/docker/ with a --platform=linux/amd64 pin on its FROM line. Under Colima/Apple Silicon, the pin forces QEMU emulation, and gcc segfaults compiling the msgpack native gem during bundle install — blocking local parametric runs against dd-trace-rb on arm64.

Changes

Drop --platform=linux/amd64 from utils/build/docker/ruby/parametric/Dockerfile. The ruby:3.2.1-bullseye base image is multi-arch on Docker Hub, so this:

  • remains amd64 on CI (ubuntu-latest is amd64), and
  • becomes arm64 on Apple Silicon dev machines — matching the host-arch default already used by every other parametric Dockerfile (cpp, dotnet, golang, java, nodejs, php, python, rust).

This was found while verifying a new laptop could run the full system-tests local-build flow for all nine tracer languages. Ruby was the only one that failed under Colima/arm64; with this change, TEST_LIBRARY=ruby ./run.sh PARAMETRIC -k "test_start_span" passes against the local dd-trace-rb checkout in ~26s.

Note on host-arch divergence

A reviewer pointed out that this makes the Ruby parametric image's architecture depend on the build host — amd64 in CI, arm64 on Apple Silicon. That property already applies to every other parametric Dockerfile (none of them pin a platform), so this PR aligns Ruby with the existing convention rather than introducing new divergence. A separate, larger refactor would be needed to add explicit platform control to the parametric build path (see utils/docker_fixtures/_test_clients/_core.py) — out of scope here.

Workflow

  1. ⚠️ Created as draft ⚠️
  2. CI to confirm green
  3. Mark ready for review after CI passes

Reviewer checklist

  • Anything but tests/ or manifests/ is modified — touches utils/build/docker/ruby/parametric/Dockerfile, will need R&P approval
  • A docker base image is modified — build-ruby-image label is set
  • A scenario is added, removed or renamed — N/A

🤖 Generated with Claude Code

The Ruby parametric Dockerfile was the only one in `utils/build/docker/`
with a `--platform=linux/amd64` pin on its FROM line. The other eight
languages (cpp, dotnet, golang, java, nodejs, php, python, rust) all use
plain `FROM <image>` and resolve to the host's native architecture.

Under Colima/Apple Silicon, the amd64 pin forces QEMU emulation, and
gcc segfaults compiling the msgpack native gem during `bundle install`
-- blocking local parametric runs against dd-trace-rb on arm64.

The `ruby:3.2.1-bullseye` base image is multi-arch on Docker Hub, so
this remains amd64 on CI (`ubuntu-latest` is amd64) and becomes arm64
on Apple Silicon dev machines -- matching the host-arch default already
used by every other tracer.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 added ai-generated The pull request includes a significant amount of AI-generated code ruby Pull requests that update Ruby code labels May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

utils/build/docker/ruby/parametric/Dockerfile                           @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated The pull request includes a significant amount of AI-generated code ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant