Skip to content

[python] Enable debugger guardrail system tests - #7995

Open
P403n1x87 wants to merge 4 commits into
mainfrom
python/di-guardrails-phase1-gaps
Open

P403n1x87 wants to merge 4 commits into
mainfrom
python/di-guardrails-phase1-gaps

Conversation

@P403n1x87

Copy link
Copy Markdown
Contributor

Motivation

Add the capture-timeout weblog endpoint and line mapping for the Python flask weblog, and enable the guardrail tests that the tracer already supports:

  • Test_Debugger_Capture_Timeout_Guardrail (v4.13.0)
  • Test_Debugger_Evaluation_Timeout_Method_Probe (v4.13.0)
  • Test_Debugger_Snapshot_Size_Guardrail (v2.11.0)
  • Test_Debugger_Probe_Budgets::test_log_line_capture_expression_budgets (DEBUG-5743 fixed in v4.12.0)

Changes

Updated manifests and tests to ensure the guardrails are tested with the appropriate versions.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Tests, manifest, weblog are modified -> you'll need a review from system-tests-reviewers: ask to one of youre co-worker familiar with the tested feature.
    • Framework is modified, or non obvious usage of it -> get a review from system-tests-core (slack)

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Add the capture-timeout weblog endpoint and line mapping for the Python
flask weblog, and enable the guardrail tests that the tracer already
supports:

- Test_Debugger_Capture_Timeout_Guardrail (v4.13.0)
- Test_Debugger_Evaluation_Timeout_Method_Probe (v4.13.0)
- Test_Debugger_Snapshot_Size_Guardrail (v2.11.0)
- Test_Debugger_Probe_Budgets::test_log_line_capture_expression_budgets
  (DEBUG-5743 fixed in v4.12.0)
@P403n1x87 P403n1x87 added the python Pull requests that update Python code label Oct 8, 2026
@P403n1x87
P403n1x87 requested review from a team as code owners October 8, 2026 09:52
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@P403n1x87
P403n1x87 requested review from dudikeleti and removed request for a team October 8, 2026 09:52
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/python.yml                                                    @DataDog/system-tests-reviewers
tests/debugger/utils.py                                                 @DataDog/debugger
tests/schemas/test_schemas.py                                           @DataDog/system-tests-reviewers
utils/build/docker/python/flask/debugger/data_generator.py              @DataDog/system-tests-reviewers
utils/build/docker/python/flask/debugger/debugger_controller.py         @DataDog/system-tests-reviewers

@datadog-prod-us1-6 datadog-prod-us1-6 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The capture-timeout probe targets the return statement where largeCollection is in scope, and the nested fixture passed the child’s smoke check. Full tracer-backed guardrail behavior remains unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit f1da4ca · @DataDog review to ask questions

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Tests

✅ All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 314d53f | Docs | View more details | Give us feedback!

P403n1x87 and others added 3 commits October 12, 2026 10:46
…meout

Python emits `stack: null` in snapshots for probes whose condition
evaluation exceeds the budget, which the schema rejects.

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants