Skip to content

[ruby] DEBUG-4675: Enable test_default_max_reference_depth#6918

Merged
p-datadog merged 4 commits into
mainfrom
enable-debugger-default-max-reference-depth-ruby
May 13, 2026
Merged

[ruby] DEBUG-4675: Enable test_default_max_reference_depth#6918
p-datadog merged 4 commits into
mainfrom
enable-debugger-default-max-reference-depth-ruby

Conversation

@p-datadog

@p-datadog p-datadog commented May 13, 2026

Copy link
Copy Markdown
Member

Summary

Version-gates the bug (DEBUG-4675) marker for tests/debugger/test_debugger_probe_snapshot.py::Test_Debugger_Line_Probe_Snaphots::test_default_max_reference_depth in manifests/ruby.yml to '<2.34.0-dev'.

Companion to DataDog/dd-trace-rb#5753 (merged), which fixes the off-by-one in the dd-trace-rb Dynamic Instrumentation serializer's max capture depth handling. The Ruby tracer was capturing N+1 levels for max_capture_depth=N; from 2.34.0-dev onward it captures N levels.

The gate uses '<2.34.0-dev' (not '<2.34.0') so the dev tracer is not covered by the bug marker — 2.34.0-dev < 2.34.0 is true per semver prerelease ordering, so '<2.34.0' would incorrectly skip the test on the tracer that contains the fix. This matches the existing convention for prerelease-period gates in ruby.yml (the APMLP-1047 entries at lines 1170/1174/1178/1182/1186/1190 all use '<X.Y.0-dev').

Validation

On commit 5e3fe16fb (this PR's tip), the DEBUGGER_PROBES_SNAPSHOT scenario ran test_default_max_reference_depth with the expected behaviour on every supported weblog:

Weblog dev (2.34.0-dev) prod (2.33.0)
rails72 passed skipped — bug (DEBUG-4675)
rails80 passed skipped — bug (DEBUG-4675)
uds-rails passed skipped — bug (DEBUG-4675)

Other weblogs (rack, sinatra14/22/32/41, rails42/52/61, uds-sinatra) skip via the parent class's '*': irrelevant declaration — unchanged by this PR.

Test plan

Removes the DEBUG-4675 bug marker for
test_debugger_probe_snapshot.py::Test_Debugger_Line_Probe_Snaphots
::test_default_max_reference_depth.

Companion to DataDog/dd-trace-rb#5753, which fixes the off-by-one in
the dd-trace-rb Dynamic Instrumentation serializer's max capture
depth handling.
@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/ruby.yml                                                      @DataDog/ruby-guild @DataDog/asm-ruby

p-datadog pushed a commit to DataDog/dd-trace-rb that referenced this pull request May 13, 2026
Forces the system-tests assertion covered by DEBUG-4675 to run in this
PR's CI, even though manifests/ruby.yml still marks it as `bug
(DEBUG-4675)`. Remove this entry before merging — the companion PR
DataDog/system-tests#6918 removes the bug marker once merged.
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented May 13, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5e3fe16 | Docs | Datadog PR Page | Give us feedback!

p-datadog and others added 3 commits May 13, 2026 12:42
Replace the unconditional removal with a `component_version: <2.34.0`
gate, matching the pattern used for DEBUG-3747 / DEBUG-4343. The
off-by-one bug exists in all released dd-trace-rb versions through
2.33.0; the fix in DataDog/dd-trace-rb#5753 lands on master at 2.34.0.

For tracer versions <2.34.0 the bug marker still applies. For 2.34.0+
the test runs and passes (force-run validated this on rails72/rails80/
uds-rails End-to-end CI in dd-trace-rb#5753, commit 161ab4a373).
The previous constraint `<2.34.0` incorrectly matched `2.34.0-dev`
(dd-trace-rb master), causing the test to skip even on the tracer
that contains the fix. Per semver prerelease ordering, `2.34.0-dev
< 2.34.0` is true, so the bug marker applied to dev mode.

Use `<2.34.0-dev` to follow the convention already in use by the
APMLP-1047 entries above (e.g. lines 1170, 1174, 1178). With
`<2.34.0-dev`:
  - 2.33.x: included (bug applies, test skipped) ✓
  - 2.34.0-dev: excluded (test runs against the fix on dev) ✓
  - 2.34.0-dev.N: excluded (greater prerelease segments) ✓
  - 2.34.0: excluded (release > prerelease) ✓

Confirmed evidence on previous CI run for this PR (commit
aade707): rails72/rails80/uds-rails dev variants reported
`test_default_max_reference_depth[<weblog>]` as
`outcome: skipped, declaration: bug (DEBUG-4675)` against
`library.version: 2.34.0-dev` — the test never ran on dev mode.
@p-datadog
p-datadog marked this pull request as ready for review May 13, 2026 17:48
@p-datadog
p-datadog requested review from a team as code owners May 13, 2026 17:48
p-datadog pushed a commit that referenced this pull request May 13, 2026
Replace the unconditional removal with prerelease-aware version gates,
matching the pattern used in #6918 for DEBUG-4675
and the APMLP-1047 entries above.

`<2.34.0-dev` (not `<2.34.0`) so the dev tracer is not covered by the
bug marker — per semver prerelease ordering, `2.34.0-dev < 2.34.0` is
true, so `<2.34.0` would skip the test on the tracer that contains
the fix.

Companion to DataDog/dd-trace-rb#5754 (merged), which makes
`Utils.path_matches_suffix?` and `Utils.path_can_match_spec?`
case-insensitive (DEBUG-5107) and tolerant of Windows-style backslash
separators in user-supplied probe source paths (DEBUG-5111).
@p-datadog p-datadog changed the title [ruby] Enable test_default_max_reference_depth [ruby] DEBUG-4675: Enable test_default_max_reference_depth May 13, 2026
@p-datadog
p-datadog merged commit e31ef61 into main May 13, 2026
65 checks passed
@p-datadog
p-datadog deleted the enable-debugger-default-max-reference-depth-ruby branch May 13, 2026 19:50
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