← Back to Pull requests

[KAI] Tag pods and containers with their KAI workload and queue #58894

Closed
unknown closed this pull request without merging on Oct 28, 2026 21:16 UTC
View on GitHub
unknown unknown commented on Oct 26, 2026 15:40 UTC
Author

What does this PR do?

Tags KAI pods and their containers (and so their GPU metrics) with the KAI workload and queue.

  • kube_scheduler:kai, kube_scheduler_workload:<PodGroup>, kube_scheduler_queue:<queue>, plus the KAI-specific kai_workload and kai_queue. Workload tags are orchestrator cardinality and queue tags low, as for Kueue.

  • The PodGroup comes from the pod's pod-group-name annotation in the pod's namespace. Its labels and annotations can be added as tags through kubernetes_resources_labels_as_tags/kubernetes_resources_annotations_as_tags for podgroups.scheduling.run.ai.

  • When the PodGroup isn't in workloadmeta, the queue tags come from the pod's kai.scheduler/queue label, without workload tags.

  • Pods are retagged when their PodGroup is set, updated or deleted, reusing the Kueue retagging from #57117. Retags are done once per event bundle rather than once per PodGroup, since there can be one PodGroup per pod.
  • Motivation

    AXT-137, with the tags agreed in AXT-134. Stacked on #58845.

    Describe how you validated your changes

    Unit test.

    Additional Notes

    [AXT-137]: https://datadoghq.atlassian.net/browse/AXT-137?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

    [AXT-134]: https://datadoghq.atlassian.net/browse/AXT-134?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

    Diff: 192 lines (+144 / -48) across 2 files Reviewer: martavicentenavarro Review duration: 3215m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 192 lines diff across 2 files
    0.36
    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.315
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #58894"
    general weight: 0.35
    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: 35.9% (MEDIUM) · Higher = larger blast radius
    35.9%
    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: 14.2% · Safe to merge
    14.2%