← Back to Pull requests

Scope profile label removal on nodes to deleted profile only in DDAI #3643

Closed
unknown closed this pull request without merging on Oct 21, 2026 19:23 UTC
View on GitHub
unknown unknown commented on Oct 21, 2026 18:44 UTC
Author

What does this PR do?

When deleting a DDAI, the operator would delete profile labels from all nodes, not only the the label scoped to the deleted profile. This could cause a race between how quickly profile nodes were relabeled and how quickly pods were created for the default daemonset while there was no profile label. After profile labels were readded, the new default ds pods could not be scheduled and stayed Pending

Motivation

#incident-62436

Additional Notes

Anything else we should know when reviewing?

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

Agent: vX.Y.Z
Cluster Agent: vX.Y.Z

Describe your test plan

1. Deploy operator with profiles enabled
2. Apply two profiles that each match a different node. For example, profile-a matches node-1 and profile-b matches node-2
3. Wait until the nodes are labeled: kubectl get nodes -L agent.datadoghq.com/datadogagentprofile. Using the above example, node-1 should show profile-a and node-2 should show profile-b
4. Watch the node labels: kubectl get nodes -L agent.datadoghq.com/datadogagentprofile -w
5. Watch the agent pods: kubectl get pods -w
6. In another terminal, delete profile-a: kubectl delete dap profile-a
7. In the terminal watching node labels, we expect node-1 (profile-a) to lose its label, but node-2 should remain the same
8. In the terminal watching agent pods, we expect no new default agent pods to appear

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies

  • PR has a milestone or the qa/skip-qa label

  • All commits are signed (see: [signing commits][1])
  • [1]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

    Diff: 244 lines (+183 / -61) across 3 files Reviewer: khewonc Review duration: 39m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 244 lines diff across 3 files
    0.39
    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.329
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3643"
    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: 38.8% (MEDIUM) · Higher = larger blast radius
    38.8%
    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.3% · Safe to merge
    15.3%