Skip component registry reconciliation for profile DDAIs#2668
Conversation
Profile DDAIs only manage the Node Agent DaemonSet and should never reconcile cluster-level components (DCA, CCR, OTel Gateway). Previously this was harmless because the Cleanup function generated deployment names from the profile DDAI name (e.g. "profile-name-cluster-agent"), which never matched existing deployments. PR #2651 added override.Deployment() in Cleanup to resolve the correct deployment name via name overrides. Since profile DDAIs inherit the parent DDA's name overrides (via SSA merge) alongside disabled=true, Cleanup now resolves the real deployment name and deletes it, causing a delete/recreate loop with the main DDAI. Guard ReconcileComponents with isDDAILabeledWithProfile, consistent with the existing guards for dependency management and cleanup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 943f99360b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2668 +/- ##
==========================================
- Coverage 38.69% 38.69% -0.01%
==========================================
Files 307 307
Lines 26525 26526 +1
==========================================
Hits 10265 10265
- Misses 15494 15495 +1
Partials 766 766
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
|
f978413
into
main
What does this PR do?
Guards
ReconcileComponentswithisDDAILabeledWithProfileso that profile DDAIs no longer attempt to reconcile cluster-level components (DCA, CCR, OTel Gateway).Motivation
PR #2651 introduced a regression where profile DDAIs delete the cluster agent and CCR deployments managed by the main DDAI, causing a delete/recreate loop.
Root cause: Profile DDAIs inherit the parent DDA's name overrides (via SSA merge) alongside
disabled=truefor cluster-level components. #2651 (or rather #2635 which was the base commit for 2651) addedoverride.Deployment()in theCleanupfunction to resolve the correct deployment name (see #2635 description for the bug it fixed). This causes profile DDAIs to resolve the real deployment name and delete it, instead of the harmless no-op it was before (trying to delete a non-existent deployment named after the profile DDAI).Describe your test plan
spec.override.clusterAgent.nameset (name override)DatadogAgentProfiletargeting some nodesWill also test on staging
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel🤖 Generated with Claude Code