WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@levan-m
Copy link
Contributor

@levan-m levan-m commented Dec 5, 2025

What does this PR do?

  • 6c855b1 resolves some seemingly accidental differences: feature error handling; passing ctx; introspection provider; error handling in cleanupV2ClusterChecksRunner. Mostly following DCA pattern in most cases. Also adds a test to cover these changes up front.
  • 80db14a moved cleanupOldCCR** function to file where it's used. Changed some log lines, variable names.
  • 619d4e0 pulled some of the functions, variable so they can be parametrized later.
  • bb24086 moved status cleanup inside component cleanup which was case with CCR, not DCA. This simplifies code but seems reasonable as we want to clear status only when component is cleaned up not before that.
  • 043a3cc move custom logic outside and added no-op function where necessary. reconcile and cleanup should be same, only using different functions which probably can be parametrized or extracted in interface - which would be next step.

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

@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 71.33333% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.66%. Comparing base (32259e9) to head (043a3cc).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ontroller/datadogagent/controller_reconcile_ccr.go 71.87% 12 Missing and 6 partials ⚠️
...ontroller/datadogagent/controller_reconcile_dca.go 75.55% 5 Missing and 6 partials ⚠️
...er/datadogagent/controller_reconcile_v2_helpers.go 74.28% 4 Missing and 5 partials ⚠️
pkg/testutils/builder.go 0.00% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2380      +/-   ##
==========================================
+ Coverage   36.56%   36.66%   +0.10%     
==========================================
  Files         281      282       +1     
  Lines       23911    23979      +68     
==========================================
+ Hits         8743     8792      +49     
- Misses      14484    14501      +17     
- Partials      684      686       +2     
Flag Coverage Δ
unittests 36.66% <71.33%> (+0.10%) ⬆️

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% <100.00%> (ø)
pkg/testutils/builder.go 0.00% <0.00%> (ø)
...er/datadogagent/controller_reconcile_v2_helpers.go 60.12% <74.28%> (+4.30%) ⬆️
...ontroller/datadogagent/controller_reconcile_dca.go 68.23% <75.55%> (+19.42%) ⬆️
...ontroller/datadogagent/controller_reconcile_ccr.go 67.46% <71.87%> (+1.68%) ⬆️

... and 2 files with indirect coverage changes


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 32259e9...043a3cc. Read the comment docs.

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants