Skip to content

Remove bogus v1 payload version gates from nodejs/ruby manifests - #7447

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
dario.castane/stoic-margulis-1d62a7
Aug 6, 2026
Merged

Remove bogus v1 payload version gates from nodejs/ruby manifests#7447
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
dario.castane/stoic-margulis-1d62a7

Conversation

@darccio

@darccio darccio commented Aug 4, 2026

Copy link
Copy Markdown
Member

⚠️ Merge order: this PR must land BEFORE #7450.
#7450 adds an assert root_spans, "Expected at least one root span" guard to Test_V1TopLevelSpans, which is still activated for the 6 nodejs weblogs on main. This PR deactivates it. If #7450 merges first, nodejs Test_V1TopLevelSpans goes red until this PR follows.

Motivation

The file-level manifest entries for tests/test_v1_payloads.py in manifests/nodejs.yml and manifests/ruby.yml declared version gates for a capability that does not exist in either tracer. Verified against tracer sources:

  • dd-trace-js: packages/dd-trace/src/encode/ contains only 0.4.js and 0.5.js on every ref, including master and tag v6.8.0 — which is also the current latest release. No v1 encoder has ever been committed, so >=6.8.0 asserted support that never shipped.
  • dd-trace-rb: lib/datadog/tracing/transport/http.rb declares only /v0.4/traces and /v0.3/traces on both v2.33.0 and master. There is no protocol_version setting and no DD_TRACE_AGENT_PROTOCOL_VERSION env var anywhere in the gem, so >=2.33.0 asserted support that never shipped.

Both blocks were generated by the easy-win auto-activation script, which replaced a plain tests/test_v1_payloads.py: missing_feature with a file-level version gate plus per-class missing_feature overrides — including the bot's leftover # TODO: a lower version might be supported comment:

Changes

Collapsed both to a single missing_feature entry carrying the reason, removing the version gates, the per-class duplicates, and the stale # TODO. Net: 2 insertions, 57 deletions, no files outside these two manifests.

⚠️ This is not a no-op — it disables 7 previously-activated entries

The gates were not inert. Because declarations accumulate rather than override, the per-class overrides masked the gate only for the classes they named — and each manifest omitted exactly one class, leaving the gate live for it. The file has five classes; nodejs declared four and ruby declared a different four:

Manifest Class left un-shadowed Before
nodejs Test_V1TopLevelSpans no declaration → activated (× 6 weblogs)
ruby Test_V1SpanEvents no declaration → activated (rack)

So those tests were activated and expected to pass against tracers with no v1 support at all.

Verified with Manifest.get_declarations() across all five classes and every affected weblog, before and after: the only semantic change is those 7 entries going from no-declaration to missing_feature. No test that was previously disabled becomes enabled. Since missing_feature is a non-strict xfail, the newly disabled entries XPASS silently rather than break CI.

Manifest.validate() passes. yamlfmt lint is clean on both files (scoped to the two edited files — my local yamlfmt is v0.20.0 vs the v0.16.0 pinned by format.sh/CI, and a full sweep produces spurious diffs in manifests/python.yml).

Reviewer notes

Why the bot got this wrong. Test_V1TopLevelSpans::test_root_span_is_top_level iterates interfaces.library.get_root_spans(self.r) with no non-empty guard. get_root_spans (utils/interfaces/_library/core.py:145) is a generator that yields nothing when no root spans match, so when the tracer sends v0.4 the loop body never executes and the test passes vacuously — which is how the auto-activation script classified it as an easy win. Compare get_root_span singular (core.py:159), which does assert spans, "No root spans found". Test_V1PayloadByDefault::test_main looks to have the same flaw. Fixing that test is out of scope here and tracked separately; the manifest cleanup addresses the symptom, not the upstream cause.

These entries are bot-managed, so the auto-activation script may regenerate them unless its pass-detection is fixed — flagging for #apm-shared-testing.

Java and golang left untouched. Both share the same bot-generated file-level-gate shape and both have live un-shadowed classes (java: Test_V1Payloads/Test_V1SpanLinks/Test_V1TopLevelSpans on 4 weblogs; golang: 4 classes on both weblogs). Unlike nodejs/ruby these tracers do appear to have real v1 support (golang Test_V1Payloads: v2.7.0), so activation may be legitimate. Worth noting structurally though: a file-level version gate auto-activates any new class added to the file for those weblogs.

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 — only manifests/ is modified
  • 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

The file-level entries for tests/test_v1_payloads.py in manifests/nodejs.yml
and manifests/ruby.yml declared version gates for a capability that does not
exist in either tracer:

- dd-trace-js: packages/dd-trace/src/encode/ contains only 0.4.js and 0.5.js
  on every ref, including master and tag v6.8.0 (which is also the latest
  release). No v1 encoder has ever been committed, so '>=6.8.0' asserted
  support that never shipped.
- dd-trace-rb: lib/datadog/tracing/transport/http.rb declares only
  /v0.4/traces and /v0.3/traces on both v2.33.0 and master. There is no
  protocol_version setting and no DD_TRACE_AGENT_PROTOCOL_VERSION env var
  anywhere in the gem, so '>=2.33.0' asserted support that never shipped.

Both blocks were generated by the easy-win auto-activation script, which
replaced a plain `missing_feature` with a file-level version gate plus
per-class missing_feature overrides (see 8c308b5 and 12b02cb, including
the bot's leftover "# TODO: a lower version might be supported" comment).

Because manifest declarations accumulate rather than override, those per-class
overrides masked the gate for the classes they named -- but each manifest
omitted exactly one class, leaving the gate live for it. The file has five
classes; nodejs declared four and ruby declared a different four, so
Test_V1TopLevelSpans (nodejs, 6 weblogs) and Test_V1SpanEvents (ruby, rack)
were activated and expected to pass against tracers with no v1 support.

Collapse both to a single missing_feature entry carrying the reason, which
disables those 7 previously-activated entries. Verified with
Manifest.get_declarations() across all five classes and every affected weblog:
no test that was previously disabled becomes enabled. missing_feature is a
non-strict xfail, so the newly disabled entries XPASS silently rather than
break CI.

Java and golang share the same bot-generated shape but appear to have genuine
v1 support, so they are left untouched.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/nodejs.yml                                                    @DataDog/dd-trace-js
manifests/ruby.yml                                                      @DataDog/ruby-guild @DataDog/asm-ruby

@darccio darccio added the ai-generated The pull request includes a significant amount of AI-generated code label Aug 4, 2026
darccio added a commit that referenced this pull request Aug 4, 2026
The Test_V1TopLevelSpans deactivation added here overlapped #7447, which
removes the bogus file-level version gate for tests/test_v1_payloads.py and
collapses the whole block to a single `missing_feature` entry. That entry
already covers Test_V1TopLevelSpans for all six nodejs weblogs, so the
per-class block added here was redundant, and it attached to context lines
that #7447 deletes -- so whichever PR merged second would have conflicted.

Keep this PR test-only and let #7447 own all manifest deactivation.

This creates a merge-order dependency: #7447 must land first, otherwise the
new "Expected at least one root span" assertion turns nodejs
Test_V1TopLevelSpans red, since it is still activated on main.

Co-Authored-By: Claude <noreply@anthropic.com>
@darccio

darccio commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

The vacuous-pass fix referenced above is now #7450 (test-only).

Merge order: this PR must land first. #7450 adds an assert root_spans, "Expected at least one root span" guard to Test_V1TopLevelSpans, which is still activated for the 6 nodejs weblogs on main. Until this PR deactivates it, that guard turns nodejs red.

#7450 originally carried its own per-class deactivation block so it could merge in either order, but it duplicated what this PR's file-level missing_feature entry already covers and conflicted textually with the lines this PR deletes. It has been reduced to test-only, so manifest deactivation lives here and test logic lives there.

@darccio
darccio marked this pull request as ready for review August 5, 2026 16:47
@darccio
darccio requested review from a team as code owners August 5, 2026 16:47
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 mergequeue-status: done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants