Skip to content

[php] Re-enable Test_ExtendedHeartbeat for PHP with SchemaBug for null dependency versions#6919

Merged
khanayan123 merged 5 commits into
mainfrom
ayan.khan/enable-php
May 13, 2026
Merged

[php] Re-enable Test_ExtendedHeartbeat for PHP with SchemaBug for null dependency versions#6919
khanayan123 merged 5 commits into
mainfrom
ayan.khan/enable-php

Conversation

@khanayan123
Copy link
Copy Markdown
Contributor

@khanayan123 khanayan123 commented May 13, 2026

Summary

Re-enables Test_ExtendedHeartbeat for PHP at >=1.20.0 by registering a SchemaBug for the known null-version-in-dependencies deviation, instead of disabling the test entirely.

Follow-up to #6338 (merged 2026-05-12) where I had to revert PHP back to missing_feature in commit 4aabacfb7 because dd-trace-php emits null for dependencies[].version in the app-extended-heartbeat payload, failing schema validation in Test_DdtraceSchemas with:

None is not of type 'string' on instance $.payload.dependencies[12].version

Tracking ticket

APMAPI-1938 — PHP emits null for dependencies[].version in app-extended-heartbeat payload — filed against APM SDK Capabilities, Bug, system-tests label, unassigned for apm-php triage.

Why a SchemaBug rather than leave the test disabled?

  • The libdatadog-side fixes are already shipped and present in dd-trace-php master via the submodule pin at 91fd13c8 (12 commits ahead of libdatadog#1910, also includes #1962 "include dependencies and integrations in app-extended-heartbeat"). The dependencies array is being populated correctly.
  • The remaining bug is dd-trace-php's own dependency tracker emitting null for the version field on some entries — a tracer-side fix, not a libdatadog gap. As of 2026-05-13 there's no fix on dd-trace-php master for this.
  • Pattern parallels the previous golang SchemaBug for $.payload.configuration[].value (ticket APMS-12697), which we dropped in Add end-to-end Test_ExtendedHeartbeat for app-extended-heartbeat telemetry event #6338 once the spec was relaxed in instrumentation-telemetry-api-docs#124. Same shape: document the deviation, keep the test running for everything else.

Changes

  • manifests/php.yml — flip Test_ExtendedHeartbeat from missing_feature back to '>=1.20.0'.
  • tests/schemas/test_schemas.py — add SchemaBug entries scoped to php AND scenarios.telemetry_extended_heartbeat for $.payload.dependencies[].version on both the library (/telemetry/proxy/api/v2/apmtelemetry) and agent (/api/v2/apmtelemetry) interfaces. Scenario scoping ensures unrelated null-version regressions in other PHP payloads (e.g. app-dependencies-loaded in DEFAULT) remain visible.

…ions

Yesterday's revert (4aabacf) flipped php Test_ExtendedHeartbeat back
to missing_feature because dd-trace-php v1.20.0 emits null for
dependencies[].version in the app-extended-heartbeat payload, failing
schema validation in Test_DdtraceSchemas.

The libdatadog-side fixes (#1910 schedule ExtendedHeartbeat,
#1962 include dependencies and integrations) are already in
dd-trace-php master via the submodule pin at 91fd13c8 — the
remaining null-version emission is a dd-trace-php tracker bug,
not a libdatadog gap.

Register the deviation as a SchemaBug (parallels the pattern used
for golang's $.payload.configuration[].value before the spec
relaxation in instrumentation-telemetry-api-docs#124) on both
the library (/telemetry/proxy/api/v2/apmtelemetry) and agent
(/api/v2/apmtelemetry) interfaces, scoped to php. Re-enables
Test_ExtendedHeartbeat at >=1.20.0.

Ticket placeholder PHP-XXXX — needs a real apm-php ticket filed
for the null-version emission so this entry can be tracked to
removal.

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

CODEOWNERS have been resolved as:

manifests/php.yml                                                       @DataDog/apm-php @DataDog/asm-php
tests/schemas/test_schemas.py                                           @DataDog/system-tests-core

@khanayan123 khanayan123 changed the title Re-enable Test_ExtendedHeartbeat for PHP with SchemaBug for null dependency versions [php] Re-enable Test_ExtendedHeartbeat for PHP with SchemaBug for null dependency versions May 13, 2026
@khanayan123 khanayan123 marked this pull request as ready for review May 13, 2026 14:19
@khanayan123 khanayan123 requested review from a team as code owners May 13, 2026 14:19
@khanayan123 khanayan123 marked this pull request as draft May 13, 2026 14:21
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b2efda83c0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/schemas/test_schemas.py Outdated
SchemaBug(
endpoint="/telemetry/proxy/api/v2/apmtelemetry",
data_path="$.payload.dependencies[].version",
condition=context.library == "php",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Narrow the PHP schema exemption to the extended-heartbeat scenario

Because Test_DdtraceSchemas is decorated with @scenario_groups.end_to_end, this condition applies in every PHP end-to-end scenario, not just TELEMETRY_EXTENDED_HEARTBEAT. Any PHP telemetry request on this endpoint with a null payload.dependencies[].version (for example an app-dependencies-loaded payload in DEFAULT) will now be silently excluded from schema validation, even though the manifest change only re-enables Test_ExtendedHeartbeat for >=1.20.0. Please scope this exemption at least to context.scenario is scenarios.telemetry_extended_heartbeat (and mirror that on the agent entry below) so unrelated PHP schema regressions remain visible.

Useful? React with 👍 / 👎.

Filed ticket: https://datadoghq.atlassian.net/browse/APMAPI-1938
("PHP emits null for dependencies[].version in app-extended-heartbeat payload")

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@khanayan123 khanayan123 marked this pull request as ready for review May 13, 2026 14:33
…tbeat scenario

Per PR review (Codex bot): Test_DdtraceSchemas runs in every
@scenario_groups.end_to_end scenario, so an unscoped php exemption
would silently mask null-version regressions in unrelated payloads
like app-dependencies-loaded under the DEFAULT scenario.

Narrow the condition to context.scenario is scenarios.telemetry_extended_heartbeat
on both the library and agent interface entries so unrelated
regressions stay visible.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread manifests/php.yml Outdated
Co-authored-by: Charles de Beauchesne <charles.debeauchesne@datadoghq.com>
@khanayan123 khanayan123 requested a review from cbeauchesne May 13, 2026 14:57
@khanayan123 khanayan123 enabled auto-merge (squash) May 13, 2026 15:36
@datadog-official
Copy link
Copy Markdown

datadog-official Bot commented May 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: 192834a | Docs | Datadog PR Page | Give us feedback!

@khanayan123 khanayan123 merged commit cca5188 into main May 13, 2026
1407 of 1409 checks passed
@khanayan123 khanayan123 deleted the ayan.khan/enable-php branch May 13, 2026 17:16
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.

3 participants