Skip to content

[CONTP-1329] Cleanup component properly when name is overridden#2635

Closed
tbavelier wants to merge 5 commits intomainfrom
tbavelier/disable-component-clean-object-if-override
Closed

[CONTP-1329] Cleanup component properly when name is overridden#2635
tbavelier wants to merge 5 commits intomainfrom
tbavelier/disable-component-clean-object-if-override

Conversation

@tbavelier
Copy link
Member

What does this PR do?

Use the component name override deployment when cleaning up

Motivation

Found an issue: when disabling a component with an override name, it won't clear the deployment. It does work when the default name is used. https://datadoghq.atlassian.net/browse/CONTP-1329

Additional Notes

There's still the edge case where in a single step a customer disables a component and changes its name. A fix would be possibly ugly so leaving as it is for now.

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 a basic DDA
  2. Disable the clusterAgent component with an override spec.override.clusterAgent.disabled=true
    1. Verify the deployment is deleted
  3. Remove the disable override and add a name spec.override.clusterAgent.name=foo
    1. A foo- deployment should be created
  4. Add again the disable override and verify the foo deployment is cleaned up

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)

@tbavelier tbavelier added this to the v1.25.0 milestone Feb 24, 2026
@tbavelier tbavelier requested a review from a team February 24, 2026 15:52
@tbavelier tbavelier added the bug Something isn't working label Feb 24, 2026
@tbavelier tbavelier requested a review from a team as a code owner February 24, 2026 15:52
@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.41%. Comparing base (e60a172) to head (f1f236c).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2635   +/-   ##
=======================================
  Coverage   38.41%   38.41%           
=======================================
  Files         305      305           
  Lines       26327    26327           
=======================================
  Hits        10113    10113           
  Misses      15457    15457           
  Partials      757      757           
Flag Coverage Δ
unittests 38.41% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e60a172...f1f236c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tbavelier
Copy link
Member Author

Done with #2651

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants