[KAI] Stream KAI PodGroups only to the nodes running their pods #59103
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #59103"
general
weight: 0.35
adel121
What does this PR do?
Sends each node Agent only the KAI PodGroups of the pods running on it, keeping PodGroups out of the shared stream history. Stacked on #58845.
Motivation
Review on #58845.
Describe how you validated your changes
Unit tests (per-node delivery, gang across nodes, history resync).
<details>
<summary>Manual QA on a 3-node cluster</summary>
a. Setup
Same cluster and setup as the QA in #58845: the KAI test cluster from AXT-106 (KAI Scheduler v0.18.5), plus 2 CPU workers, with
ip-172-31-10-249(control plane, GPUs),ip-172-31-86-43andip-172-31-93-17. The Datadog Helm chart (3.254.1) ran the CI images of this PR (commit 6c0443e):The PodGroups RBAC was added by hand as in #58845. Pods RBAC comes from the chart.
b. Workloads
The same two workloads as in #58845: a single-pod Deployment pinned to
ip-172-31-86-43, and a 3-pod gang Job (kai.scheduler/batch-min-member: "3", pod anti-affinity) with one pod per node. The 3kai-demoPodGroups belong to workloads that run only onip-172-31-10-249.c. Output on the Cluster Agent and on each node Agent
With both workloads running, the Cluster Agent has every PodGroup, and each node Agent has only the PodGroups of its own pods:
After
kubectl -n kai-qa delete deploy single-infer, its PodGroup is removed from the Cluster Agent and fromip-172-31-86-43:After
kubectl -n kai-qa delete job gang-train, it is removed from its 3 nodes, and the workers have no PodGroups left:Full state and burst
ip-172-31-93-17while both workloads ran: its full state only had the gang Job's PodGroup. Restarting the Cluster Agent gave every node the same PodGroups as before.ip-172-31-86-43(90 PodGroups, created in 5 s): that node went from 2 to 92 PodGroups, the other nodes didn't change (4 and 1), andmetadata_streaming.history_resyncswas never incremented. After deleting them (7 s), all nodes went back to 4, 2 and 1.</details>
[AXT-106]: https://datadoghq.atlassian.net/browse/AXT-106?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ