← Back to Pull requests

test: federate tracer test ownership to product owners #21717

Closed
unknown closed this pull request without merging on Nov 17, 2026 17:24 UTC
View on GitHub
unknown unknown commented on Nov 12, 2026 15:35 UTC
Author

Description

Let product teams review and maintain their own tests directly, reducing unnecessary reliance on SDK Capabilities for changes outside tracing. This PR federates ownership of tests currently grouped under tests/tracer/ by moving them into the appropriate product folders, where existing directory ownership routes reviews to the right teams.

The first commit fixes test isolation on the original paths, so it can be extracted into a standalone PR. The remaining commits group the moves by destination code owner; each move includes its old-path removal.

| Commit | Review scope | Code owners |
| --- | --- | --- |
| 9bf8b67 | Standalone test isolation fixes on original paths | @DataDog/apm-sdk-capabilities |
| b9407b6 | Shared utilities, configuration and process identity | @DataDog/apm-core-python |
| 34ffbc2 | AWS Lambda runtime identity and lifecycle | @DataDog/apm-serverless, @DataDog/serverless-aws |
| 20dedfb | Git metadata and CI writer tests | @DataDog/ci-app-libraries |
| a7f8562 | Botocore span pointers and shared web assertions | @DataDog/python-guild, @DataDog/apm-idm-python |
| e2d0355 | ASM tracing, propagation and sampling | @DataDog/asm-python |
| c0df536 | Standalone tests and shared test plumbing | @DataDog/python-guild, @DataDog/apm-core-python (CODEOWNERS) |

Split mixed files along these boundaries and update fixture paths, subprocess imports and CI selection. The moved settings tests become test_config.py to avoid the existing test_settings.py. The Git metadata fixture uses uv to install its local wheel.

The only CODEOWNERS change removes the obsolete ASM propagation override.

Testing

  • Agent configuration and logger isolation: 82 passed on Python 3.9 and 82 passed on Python 3.12.

  • Confirmed the logger ordering regression before the fix: six environment tests failed after the logger tests.

  • Lint checks passed. The other moved files and dependency definitions are unchanged from the earlier validation.
  • Risks

    Test node IDs and review routing change. Runtime code is unchanged.

    Additional Notes

    APMAPI-2792. Test-only cleanup; no release note needed.

    Compared with the median of 10 recent main runs, the measured PR run reduces the slowest tracer job from 8m06s to 5m57s (~27%) and increases internal from 11m36s to 13m23s (~15%). Internal remains within main’s observed range and finishes before profiling (15m11s) and OpenTelemetry (14m57s), so it does not become the test bottleneck. We’re keeping runner allocation unchanged in this ownership cleanup.

    [APMAPI-2792]: https://datadoghq.atlassian.net/browse/APMAPI-2792?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

    Diff: 428 lines (+321 / -107) across 5 files Reviewer: wconti27 Review duration: 7309m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 428 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.363
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #21717"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.1% (MEDIUM) · Higher = larger blast radius
    45.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.8% · Safe to merge
    17.8%