Skip to content

[python] restrict DEBUG-5715 schema known bug to python <4.17.0rc1 - #8660

Draft
P403n1x87 wants to merge 1 commit into
mainfrom
python/fix-debug-5715-schema-stack
Draft

P403n1x87 wants to merge 1 commit into
mainfrom
python/fix-debug-5715-schema-stack

Conversation

@P403n1x87

Copy link
Copy Markdown
Contributor

Motivation

DEBUG-5715: in DEBUGGER_PROBES_SNAPSHOT and DEBUGGER_EVALUATION_TIMEOUT, the Python tracer emitted debugger snapshot stack (and stacktrace) as null instead of a JSON array, which breaks the schema. Two SchemaBug entries were ignoring these errors for every Python version. DataDog/dd-trace-py#21030 fixed this, and the fix first shipped in v4.17.0rc1. It is not on the 4.16 branch. The latest release is 4.17.2.

Changes

  • tests/schemas/test_schemas.py: change the condition on both DEBUG-5715 SchemaBug entries (/debugger/v2/input $[].debugger.snapshot.stack and /api/v2/debugger $[]) from context.library == "python" to context.library < "python@4.17.0-rc1". The scenario filter is unchanged.

To check that narrowing the broad /api/v2/debugger $[] entry doesn't expose unrelated errors, I validated local payloads from python 4.15.5 (before the fix) again offline. In that data, the only error under the snapshot branch is snapshot.stack: None is not of type 'array', which is exactly what the fix addresses. Python >= 4.17 CI runs will be the final check.

The system-tests-review skill was run on this change and all four lenses found nothing: test effectiveness, lifecycle and isolation, activation and metadata, infrastructure and conventions.

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 🛟

🤖 Generated with Claude Code

DataDog/dd-trace-py#21030 makes debugger snapshots always emit `stack`
and `stacktrace` as JSON arrays instead of null. It first shipped in
v4.17.0rc1 and was not backported to 4.16. Restrict both DEBUG-5715
SchemaBug entries to earlier versions so schema validation covers
current Python releases again in DEBUGGER_PROBES_SNAPSHOT and
DEBUGGER_EVALUATION_TIMEOUT.

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

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/schemas/test_schemas.py                                           @DataDog/system-tests-reviewers

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant