Skip to content

Safeguard unnecessary DS cleanup#2242

Merged
levan-m merged 4 commits intomainfrom
tbavelier/add-logs-and-do-not-delete-if-empty
Oct 16, 2025
Merged

Safeguard unnecessary DS cleanup#2242
levan-m merged 4 commits intomainfrom
tbavelier/add-logs-and-do-not-delete-if-empty

Conversation

@levan-m
Copy link
Copy Markdown
Collaborator

@levan-m levan-m commented Oct 16, 2025

What does this PR do?

Debugging + add safeguard to avoid cleaning DS if no valid are found

Same as #2239 opened against main branch.

Motivation

What inspired you to submit this pull request?

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

Write there any instructions and details you may have to test your PR.

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

@levan-m levan-m added this to the v1.19.0 milestone Oct 16, 2025
@levan-m levan-m requested a review from a team as a code owner October 16, 2025 18:54
@levan-m levan-m added the bug Something isn't working label Oct 16, 2025
* don't return from profilesToApply on DAP status update

* add/remove some logging,log uuid

* cleanup

* remove one more log line

* revert datadogagentinternal controller change
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 70.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.10%. Comparing base (f4e8de7) to head (73d4885).
⚠️ Report is 296 commits behind head on main.

Files with missing lines Patch % Lines
...troller/datadogagent/controller_reconcile_agent.go 77.77% 3 Missing and 1 partial ⚠️
...controller/datadogagent/controller_reconcile_v2.go 0.00% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (70.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2242      +/-   ##
==========================================
+ Coverage   39.08%   39.10%   +0.01%     
==========================================
  Files         254      254              
  Lines       26307    26322      +15     
==========================================
+ Hits        10282    10293      +11     
- Misses      15412    15415       +3     
- Partials      613      614       +1     
Flag Coverage Δ
unittests 39.10% <70.00%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
...controller/datadogagent/controller_reconcile_v2.go 57.14% <0.00%> (ø)
...troller/datadogagent/controller_reconcile_agent.go 66.57% <77.77%> (+0.29%) ⬆️

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 f4e8de7...73d4885. Read the comment docs.

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

@levan-m levan-m merged commit 686a1db into main Oct 16, 2025
27 of 30 checks passed
@levan-m levan-m deleted the tbavelier/add-logs-and-do-not-delete-if-empty branch October 16, 2025 20:42
dd-octo-sts bot pushed a commit that referenced this pull request Oct 16, 2025
* Attempt to fix spurrious DS cleanups

* don't return from profilesToApply on DAP status update (#2240)

* don't return from profilesToApply on DAP status update

* add/remove some logging,log uuid

* cleanup

* remove one more log line

* revert datadogagentinternal controller change

---------

Co-authored-by: Timothée Bavelier <timothee.bavelier@datadoghq.com>
(cherry picked from commit 686a1db)
levan-m added a commit that referenced this pull request Oct 16, 2025
* Attempt to fix spurrious DS cleanups

* don't return from profilesToApply on DAP status update (#2240)

* don't return from profilesToApply on DAP status update

* add/remove some logging,log uuid

* cleanup

* remove one more log line

* revert datadogagentinternal controller change

---------


(cherry picked from commit 686a1db)

Co-authored-by: levan-m <116471169+levan-m@users.noreply.github.com>
Co-authored-by: Timothée Bavelier <timothee.bavelier@datadoghq.com>
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.

4 participants