Skip to content

[Debugger] Add system-test coverage for the debugger guardrails#7287

Draft
dudikeleti wants to merge 8 commits into
mainfrom
dudik/debugger/guardrails-tests
Draft

[Debugger] Add system-test coverage for the debugger guardrails#7287
dudikeleti wants to merge 8 commits into
mainfrom
dudik/debugger/guardrails-tests

Conversation

@dudikeleti

Copy link
Copy Markdown
Contributor

Motivation

Add focused system-test coverage for the debugger guardrails required for GA.

Changes

  • Add Test_Debugger_Evaluation_Timeout: expensive when evaluation (ReDoS regex, large collection filter) must be aborted and surfaced as an evaluation-error snapshot (populated evaluationErrors[], no captured data), not a normal snapshot.
  • Add Test_Debugger_Snapshot_Guardrails: completed snapshots are trimmed to ≤1 MB, and capture exceeding the time budget reports notCapturedReason=timeout.
  • Extend test_default_max_length to assert notCapturedReason=stringLength, completing default capture-limit reason coverage.
  • Extract shared captures_contain_data helper into debugger.utils (reused by the condition-error tests).
  • All new guardrail rows are marked missing_feature across every tracer; enable per-language as support lands. The regex fixture only exercises backtracking engines (linear engines like Go stay disabled via manifests).

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?

…reasons and evaluation timeout behavior, with new rows disabled in manifests until tracer support is ready.
…re timeout reporting. 1MB snapshot cap and notCapturedReason=timeout behavior.
…ves the setup-time negative snapshot wait so evaluation-timeout assertions rely on collected scenario output instead of a fixed sleep.
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/debugger/test_debugger_guardrails.py                              @DataDog/debugger @DataDog/system-tests-core
tests/debugger/utils/probes/probe_capture_timeout_reason.json           @DataDog/debugger @DataDog/system-tests-core
tests/debugger/utils/probes/probe_evaluation_timeout_collection_filter.json  @DataDog/debugger @DataDog/system-tests-core
tests/debugger/utils/probes/probe_evaluation_timeout_regex.json         @DataDog/debugger @DataDog/system-tests-core
tests/debugger/utils/probes/probe_snapshot_size_cap.json                @DataDog/debugger @DataDog/system-tests-core
manifests/dotnet.yml                                                    @DataDog/apm-dotnet @DataDog/asm-dotnet
manifests/golang.yml                                                    @DataDog/dd-trace-go-guild
manifests/java.yml                                                      @DataDog/asm-java @DataDog/apm-java
manifests/nodejs.yml                                                    @DataDog/dd-trace-js
manifests/php.yml                                                       @DataDog/apm-php @DataDog/asm-php
manifests/python.yml                                                    @DataDog/apm-python @DataDog/asm-python
manifests/ruby.yml                                                      @DataDog/ruby-guild @DataDog/asm-ruby
tests/debugger/test_debugger_condition_errors.py                        @DataDog/debugger @DataDog/system-tests-core
tests/debugger/test_debugger_probe_snapshot.py                          @DataDog/debugger @DataDog/system-tests-core
tests/debugger/utils.py                                                 @DataDog/debugger @DataDog/system-tests-core

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 9, 2026

Copy link
Copy Markdown

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 142 Pipeline jobs failed

Testing the test | System Tests (java, dev) / End-to-end #1 / akka-http 1   View in Datadog   GitHub Actions

🧪 1 Test failed

tests.debugger.test_debugger_guardrails.Test_Debugger_Snapshot_Guardrails.test_capture_timeout_reports_reason[akka-http] from system_tests_suite   View in Datadog
AssertionError: assert 'Probes did not reach INSTALLED status within 30s\nProbes did not reach EMITTING status within 10s\nSnapshot was not received within 30s' is None
 +  where 'Probes did not reach INSTALLED status within 30s\nProbes did not reach EMITTING status within 10s\nSnapshot was not received within 30s' = <built-in method join of str object at 0x7f95bd42b720>(['Probes did not reach INSTALLED status within 30s', 'Probes did not reach EMITTING status within 10s', 'Snapshot was not received within 30s'])
 +    where <built-in method join of str object at 0x7f95bd42b720> = '\n'.join
 +    and   ['Probes did not reach INSTALLED status within 30s', 'Probes did not reach EMITTING status within 10s', 'Snapshot was not received within 30s'] = <tests.debugger.test_debugger_guardrails.Test_Debugger_Snapshot_Guardrails object at 0x7f95b4f25ca0>.setup_failures

self = <tests.debugger.test_debugger_guardrails.Test_Debugger_Snapshot_Guardrails object at 0x7f95b4f25ca0>

    def test_capture_timeout_reports_reason(self) -> None:
        """A capture exceeding the tracer's time budget identifies the value it could not finish.
    
...

Testing the test | System Tests (php, dev) / End-to-end #1 / apache-mod-7.0 1   View in Datadog   GitHub Actions

🧪 1 Test failed

tests.debugger.test_debugger_guardrails.Test_Debugger_Snapshot_Guardrails.test_capture_timeout_reports_reason[apache-mod-7.0] from system_tests_suite   View in Datadog
AssertionError: assert 'Probes did not reach INSTALLED status within 30s' is None
 +  where 'Probes did not reach INSTALLED status within 30s' = <built-in method join of str object at 0x7f02ae82b720>(['Probes did not reach INSTALLED status within 30s'])
 +    where <built-in method join of str object at 0x7f02ae82b720> = '\n'.join
 +    and   ['Probes did not reach INSTALLED status within 30s'] = <tests.debugger.test_debugger_guardrails.Test_Debugger_Snapshot_Guardrails object at 0x7f02a4d69f40>.setup_failures

self = <tests.debugger.test_debugger_guardrails.Test_Debugger_Snapshot_Guardrails object at 0x7f02a4d69f40>

    def test_capture_timeout_reports_reason(self) -> None:
        """A capture exceeding the tracer's time budget identifies the value it could not finish.
    
...

Testing the test | System Tests (php, dev) / End-to-end #1 / apache-mod-7.0-zts 1   View in Datadog   GitHub Actions

🧪 1 Test failed

tests.debugger.test_debugger_guardrails.Test_Debugger_Snapshot_Guardrails.test_capture_timeout_reports_reason[apache-mod-7.0-zts] from system_tests_suite   View in Datadog
AssertionError: assert 'Probes did not reach INSTALLED status within 30s' is None
 +  where 'Probes did not reach INSTALLED status within 30s' = <built-in method join of str object at 0x7f1cb382b720>(['Probes did not reach INSTALLED status within 30s'])
 +    where <built-in method join of str object at 0x7f1cb382b720> = '\n'.join
 +    and   ['Probes did not reach INSTALLED status within 30s'] = <tests.debugger.test_debugger_guardrails.Test_Debugger_Snapshot_Guardrails object at 0x7f1cac1339e0>.setup_failures

self = <tests.debugger.test_debugger_guardrails.Test_Debugger_Snapshot_Guardrails object at 0x7f1cac1339e0>

    def test_capture_timeout_reports_reason(self) -> None:
        """A capture exceeding the tracer's time budget identifies the value it could not finish.
    
...

View all 142 failed jobs.

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🔄 Datadog auto-retried 2 jobs - 0 passed on retry View in Datadog

Useful? React with 👍 / 👎

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

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bits couldn’t fix the CI

🟢 Investigated · 🔴 Fix failed · ⚪ Validate · ⚪ Ready

The newly enabled tests/debugger/test_debugger_guardrails.py::Test_Debugger_Snapshot_Guardrails::test_capture_timeout_reports_reason guardrail was running for tracer manifests where debugger capture-timeout reporting is still unsupported. Added explicit missing_feature entries for that test in manifests/dotnet.yml, manifests/golang.yml, manifests/java.yml, manifests/nodejs.yml, manifests/php.yml, manifests/python.yml, and manifests/ruby.yml.


View in Datadog | Reviewed commit 2c71ee0

@dudikeleti dudikeleti changed the title Dudik/debugger/guardrails tests [Debugger] Add system-test coverage for the debugger guardrails Jul 10, 2026
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