Skip to content

Support .NET local build testing on ARM Mac#6495

Merged
bm1549 merged 8 commits intomainfrom
brian.marks/arm-mac-local-build
Mar 23, 2026
Merged

Support .NET local build testing on ARM Mac#6495
bm1549 merged 8 commits intomainfrom
brian.marks/arm-mac-local-build

Conversation

@bm1549
Copy link
Contributor

@bm1549 bm1549 commented Mar 13, 2026

Motivation

Running parametric tests with locally built tracer libraries on ARM Mac (Apple Silicon) fails for .NET because the Dockerfile unconditionally sets LD_PRELOAD to the x86_64-only ApiWrapper.x64.so, which crashes the container immediately on ARM.

Changes

  • .NET conditional LD_PRELOAD (utils/build/docker/dotnet/parametric/Dockerfile): Replace the static ENV LD_PRELOAD=...x64.so with an entrypoint wrapper that checks for the file's existence at runtime. The ApiWrapper.x64.so is x86_64-only and crashes the container immediately on ARM.

Note: PHP changes have been split out to #6512. C++ changes were split out to #6498.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

🤖 Generated with Claude Code

bm1549 and others added 3 commits March 13, 2026 11:34
- PHP: Strip startup warnings from version string to fix semantic_version parsing
- PHP: Conditionally enable profiling based on bundle contents
- C++: Use TARGETARCH ARG for multi-arch base image selection
- .NET: Conditionally set LD_PRELOAD via entrypoint to avoid x64-only .so crash on ARM

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

CODEOWNERS have been resolved as:

utils/build/docker/dotnet/parametric/entrypoint.sh                      @DataDog/apm-dotnet @DataDog/asm-dotnet @DataDog/system-tests-core
utils/build/docker/dotnet/parametric/Dockerfile                         @DataDog/apm-dotnet @DataDog/asm-dotnet @DataDog/system-tests-core

bm1549 and others added 2 commits March 13, 2026 12:24
Dockerfile heredoc syntax requires BuildKit which may not be
available in all CI environments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bm1549 bm1549 marked this pull request as ready for review March 13, 2026 17:37
@bm1549 bm1549 requested review from a team as code owners March 13, 2026 17:37
@bm1549 bm1549 requested review from dmehala and removed request for a team March 13, 2026 17:37
bm1549 added a commit that referenced this pull request Mar 13, 2026
Use Docker's TARGETARCH build arg instead of hardcoding amd64 in the
C++ parametric base image tag, so the image builds correctly on ARM
(Apple Silicon) as well.

Split out from #6495.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The multi-arch TARGETARCH change for the C++ parametric Dockerfile has
been moved to a separate PR (#6498) to keep this PR focused on .NET,
PHP, and Python ARM Mac support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 changed the title Support local build testing on ARM Mac (Apple Silicon) Support local build testing on ARM Mac (.NET, PHP, Python) Mar 13, 2026
@datadog-prod-us1-4
Copy link

datadog-prod-us1-4 bot commented Mar 13, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e112e51 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 changed the title Support local build testing on ARM Mac (.NET, PHP, Python) Support .NET local build testing on ARM Mac Mar 16, 2026
@bm1549 bm1549 added the ai-generated The pull request includes a significant amount of AI-generated code label Mar 19, 2026
Move inline echo-based entrypoint.sh generation to a standalone file
and COPY it in the Dockerfile, per reviewer feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 requested a review from cbeauchesne March 20, 2026 16:41
@bm1549 bm1549 merged commit 6b37165 into main Mar 23, 2026
1190 of 1192 checks passed
@bm1549 bm1549 deleted the brian.marks/arm-mac-local-build branch March 23, 2026 18:37
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants