← Back to Pull requests

Base Dispatcher repository-wide paths on what pull request test jobs run #25375

Closed
unknown closed this pull request without merging on Sep 29, 2026 13:29 UTC
View on GitHub
unknown unknown commented on Sep 28, 2026 13:04 UTC
Author

What does this PR do?

Reworks REPOSITORY_WIDE_PATTERNS, the paths that make the Dispatcher test every eligible target, around one criterion: a path belongs there only if a pull request's own test jobs run it from the pull request checkout, and a change to it can break some targets but not others.

  • Removes ddev/src/ddev/cli/ci/tests/. test-dispatch.yml checks out master and plans, dispatches, and gathers with master's ddev, so a pull request's changes to the Dispatcher never run in its own Dispatcher run. Its unit tests still run through the direct rule on the ddev target.

  • Adds what batch jobs install from the pull request checkout and every target uses differently:

  • - ddev/src/ddev/plugin/external/hatch/
    , the Hatch environment collector that builds every test environment.
    - datadog_checks_dev/datadog_checks/dev/plugin/**, the pytest plugin loaded in every test session. The existing dev/[^/]+\.py pattern skips subdirectories.
    - datadog_checks_base/pyproject.toml and datadog_checks_dev/pyproject.toml, whose dependencies end up in every test environment.

    ddev/pyproject.toml stays out: the direct rule already selects the ddev target for it. Shared CI actions are handled separately in #25374.

    Planning against this repository with the change applied:

    ddev/src/ddev/cli/ci/tests/batching/units.py: 2 jobs, 1 targets ['ddev']
    ddev/src/ddev/plugin/external/hatch/environment_collector.py: 857 jobs, 225 targets
    datadog_checks_dev/datadog_checks/dev/plugin/pytest.py: 857 jobs, 225 targets
    datadog_checks_base/pyproject.toml: 857 jobs, 225 targets
    ddev/pyproject.toml: 2 jobs, 1 targets ['ddev']
    

    Motivation

    ddev/src/ddev/cli/ci/tests had 51 commits in the last 90 days, each fanning out to every target (about 857 jobs) without exercising the changed code. Meanwhile changes to the Hatch environment collector, the pytest plugin, or the base and dev dependencies, which do run in every job, only selected their own target.

    Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)

  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.

  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged
  • Diff: 303 lines (+227 / -76) across 3 files Reviewer: HadhemiDD Review duration: 1465m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 303 lines diff across 3 files
    0.40
    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.342
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #25375"
    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: 40.1% (MEDIUM) · Higher = larger blast radius
    40.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: 15.8% · Safe to merge
    15.8%