← Back to Pull requests

Collect TeamCity build configs that have no default branch builds #25782

Closed
unknown closed this pull request without merging on Nov 03, 2026 00:14 UTC
View on GitHub
unknown unknown commented on Oct 25, 2026 23:43 UTC
Author

What does this PR do?

Adds state:finished,defaultFilter:false to the TeamCity REST check's last_build request. This request picks the build the check starts collecting from for each build configuration.

Without defaultFilter:false, TeamCity applies its default build filter, which hides builds outside the default branch as well as personal, canceled, and failed-to-start builds. A build configuration whose builds all fall into that set, such as one that only builds pull request branches, got an empty response. The check never stored a starting build, asked again on every run, and never collected the configuration. The instance still reported OK.

The new_builds request already uses state:finished,defaultFilter:false, so the two requests now cover the same builds. Canceled, personal, and failed-to-start builds can now also be picked as the starting build. This does not change which builds are reported, because new_builds already includes them.

A new unit test simulates TeamCity's default filter and build states, and asserts teamcity.build_duration is reported. It fails if either defaultFilter:false or state:finished is removed. The mock server routes used by the integration tests are updated to the new locator.

Motivation

Customer escalation AGENT-17385: teamcity.build_duration has no series for one build configuration. The customer confirmed that the last_build locator returns count=0 for it, while the same locator with defaultFilter:false returns its latest build on pull/138180.

TeamCity docs: Build locator, defaultFilter.

Checklist before requesting review

<!--
The pr-description validation (Run Validations) fails until every item below is ticked and
the visible description (excluding HTML comments) is at most 3,000 characters. CI, the changelog,
and the QA label have their own checks. Request review only once all checks pass:
gh pr checks <PR> --repo DataDog/integrations-core --watch.
-->

  • I self-reviewed the full diff, and this description matches the final change

  • <!--
    How to verify: run gh pr diff <PR> --repo DataDog/integrations-core, review every changed line,
    and compare the final diff with the description above.
    -->
  • Tests cover the change, or this description explains why none are needed

  • <!--
    How to verify: check the diff for relevant tests and run them as described in AGENTS.md.
    -->
  • Automated review comments, including Codex review, were addressed or answered

  • <!--
    How to verify: run gh api repos/DataDog/integrations-core/pulls/<PR>/comments and
    gh pr view <PR> --repo DataDog/integrations-core --json reviews,comments, then fix each
    finding or reply with the reason no change is needed.
    -->
  • I, the human author, understand this change, can explain it to reviewers, and believe it meets the repository standards

  • <!-- Coding agents: never tick this item. Only the human author may tick it. -->

    <!--
    QA label: PRs that only change code owned exclusively by @DataDog/agent-integrations (see
    .github/CODEOWNERS) always use qa/skip-qa, never qa/required.
    -->

    🤖 Generated with Claude Code

    Diff: 425 lines (+318 / -107) across 5 files Reviewer: iliakur Review duration: 11550m
    All Vouch review confidence checks passed
    Residual risk 0.31 = Change Risk (0.68) × (1 − Review Confidence (0.54)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.68 · 425 lines diff across 5 files
    0.68
    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%
    54%
    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.362
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.068
    Real PR Conversation Timeline
    1 comments
    "Review active on #25782"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 54.2% reviewed sensitive_module
    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: 68.3% (HIGH) · Higher = larger blast radius
    68.3%
    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: 54.2% · Lower = rushed or shallow review
    54.2%
    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: 31.2% · Safe to merge
    31.2%