Skip to content

Support local build testing on ARM Mac (.NET, PHP, Python)#6495

Open
bm1549 wants to merge 6 commits intomainfrom
brian.marks/arm-mac-local-build
Open

Support local build testing on ARM Mac (.NET, PHP, Python)#6495
bm1549 wants to merge 6 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 due to several hardcoded x86_64 assumptions. These changes make the build infrastructure more robust for partial/local builds and multi-arch environments.

Changes

  • PHP version warning stripping (utils/_context/component_version.py): Strip Warning: lines from the PHP version string before parsing. When PHP loads a bundle missing optional .so files (e.g. datadog-profiling.so), it emits warnings to stdout that get captured in SYSTEM_TESTS_LIBRARY_VERSION, breaking semantic_version parsing.

  • PHP conditional profiling (utils/build/docker/php/common/install_ddtrace.sh): Check whether the bundle tar.gz actually contains datadog-profiling before passing --enable-profiling to datadog-setup.php. Local builds may not include profiling support, and the flag causes a hard error when the extension is missing.

  • .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: The C++ multi-arch base image change has been 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/_context/component_version.py                                     @DataDog/system-tests-core
utils/build/docker/dotnet/parametric/Dockerfile                         @DataDog/apm-dotnet @DataDog/asm-dotnet @DataDog/system-tests-core
utils/build/docker/php/common/install_ddtrace.sh                        @DataDog/apm-php @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

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 1 Test failed

tests.parametric.test_otel_logs.Test_FR11_Telemetry.test_telemetry_exporter_logs_configurations[library_env0-OTEL_EXPORTER_OTLP_LOGS_ENDPOINT-4325, parametric-python] from system_tests_suite (Datadog) (Fix with Cursor)
failed on setup with "Timeout of 60 seconds exceeded waiting for HTTP server to start. Please check logs."

Timeout of 60 seconds exceeded waiting for HTTP server to start. Please check logs.

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant