Skip to content

Support PHP local build testing on ARM Mac#6512

Merged
bm1549 merged 6 commits intomainfrom
brian.marks/arm-mac-php-local-build
Mar 17, 2026
Merged

Support PHP local build testing on ARM Mac#6512
bm1549 merged 6 commits intomainfrom
brian.marks/arm-mac-php-local-build

Conversation

@bm1549
Copy link
Contributor

@bm1549 bm1549 commented Mar 16, 2026

Motivation

Running parametric tests with a locally built PHP tracer on ARM Mac fails because:

  1. datadog-setup.php is called with --enable-profiling even when the local bundle doesn't include profiling extensions, causing a hard error.
  2. The parametric Dockerfile uses a buster base image (glibc 2.28), but build-debug-artifact compiles against bookworm (glibc 2.31+), causing GLIBC_2.29' not found errors at runtime.

Changes

  • PHP conditional profiling (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.

  • PHP parametric Dockerfile: Switch from php-8.2_buster to php-8.2_bookworm-6 to match the glibc version produced by build-debug-artifact. This also eliminates PHP startup warnings that buster emitted for missing extensions.

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? N/A

🤖 Generated with Claude Code

- Strip PHP startup warnings (e.g. missing .so files) from version
  string before parsing in component_version.py
- Only pass --enable-profiling to datadog-setup.php when the bundle
  actually contains profiling extensions (local builds may omit them)

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

github-actions bot commented Mar 16, 2026

CODEOWNERS have been resolved as:

utils/build/docker/php/common/install_ddtrace.sh                        @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/parametric/Dockerfile                            @DataDog/apm-php @DataDog/system-tests-core

bm1549 added a commit that referenced this pull request Mar 16, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 marked this pull request as ready for review March 16, 2026 21:04
@bm1549 bm1549 requested review from a team as code owners March 16, 2026 21:04
@datadog-prod-us1-6
Copy link

datadog-prod-us1-6 bot commented Mar 16, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

Switch the PHP parametric Dockerfile from buster to bookworm-6 to
match the glibc version produced by build-debug-artifact. This also
eliminates the PHP startup warnings that buster emitted, so the
component_version.py warning-stripping workaround is no longer needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bm1549 added a commit that referenced this pull request Mar 17, 2026
The install_ddtrace.sh profiling fix and parametric Dockerfile
bookworm change are handled by #6512. This PR now only contains
the prepare-local-build.sh script.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 enabled auto-merge (squash) March 17, 2026 00:55
Copy link
Contributor

@bwoebi bwoebi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, avoids the requirement for a simple build.

@bm1549 bm1549 merged commit 56bdc6f into main Mar 17, 2026
666 checks passed
@bm1549 bm1549 deleted the brian.marks/arm-mac-php-local-build branch March 17, 2026 23:53
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.

2 participants