datadog-operator icon indicating copy to clipboard operation
datadog-operator copied to clipboard

ComponentReconciler interface proposal

Open tbavelier opened this issue 3 months ago • 2 comments

What does this PR do?

  1. 3a8b8b434c33ea16155235548a3681ac46bbf33a: ComponentReconciler interface
  2. 944b226c92e954344a73b63644e1d6c75490601d: migrate DCA to interface
  3. db40055f3b1586354a23dc9d8588b3558ce61ce9: migrate CCR to interface
  4. 783fd9d4c2321bef9330a8a384a6ef27c1f63c35: add documentation

Motivation

Adding new components without duplicating shared code

Additional Notes

Implemented in both DDA/DDAI controller, so duplicate which will be cleaned up once DDAI is enabled by default/forced

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

tbavelier avatar Oct 17 '25 13:10 tbavelier

Codecov Report

:x: Patch coverage is 45.54140% with 171 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 37.18%. Comparing base (ac55939) to head (86b888c).

Files with missing lines Patch % Lines
...oller/datadogagentinternal/component_reconciler.go 0.00% 57 Missing :warning:
...adogagentinternal/component_clusterchecksrunner.go 32.60% 29 Missing and 2 partials :warning:
...ler/datadogagentinternal/component_clusteragent.go 33.33% 28 Missing and 2 partials :warning:
...al/controller/datadogagent/component_reconciler.go 77.19% 10 Missing and 3 partials :warning:
...er/datadogagentinternal/controller_reconcile_v2.go 0.00% 9 Missing :warning:
...rnal/controller/datadogagentinternal/controller.go 0.00% 7 Missing :warning:
...ogagentinternal/controller_reconcile_v2_helpers.go 0.00% 7 Missing :warning:
pkg/condition/condition.go 0.00% 5 Missing :warning:
.../controller/datadogagent/component_clusteragent.go 90.62% 2 Missing and 1 partial :warning:
...ller/datadogagent/component_clusterchecksrunner.go 88.88% 3 Missing :warning:
... and 2 more

:x: Your patch status has failed because the patch coverage (45.54%) 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    #2247      +/-   ##
==========================================
+ Coverage   37.02%   37.18%   +0.15%     
==========================================
  Files         288      290       +2     
  Lines       24445    24572     +127     
==========================================
+ Hits         9051     9136      +85     
- Misses      14690    14735      +45     
+ Partials      704      701       -3     
Flag Coverage Δ
unittests 37.18% <45.54%> (+0.15%) :arrow_up:

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 59.35% <100.00%> (+2.21%) :arrow_up:
.../controller/datadogagent/component_clusteragent.go 71.60% <90.62%> (ø)
...ller/datadogagent/component_clusterchecksrunner.go 78.37% <88.88%> (ø)
internal/controller/datadogagent/controller.go 51.85% <57.14%> (+6.39%) :arrow_up:
pkg/testutils/builder.go 0.00% <0.00%> (ø)
pkg/condition/condition.go 7.49% <0.00%> (-0.11%) :arrow_down:
...rnal/controller/datadogagentinternal/controller.go 0.00% <0.00%> (ø)
...ogagentinternal/controller_reconcile_v2_helpers.go 32.72% <0.00%> (-0.61%) :arrow_down:
...er/datadogagentinternal/controller_reconcile_v2.go 0.00% <0.00%> (ø)
...al/controller/datadogagent/component_reconciler.go 77.19% <77.19%> (ø)
... and 3 more

... and 1 file 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 ac55939...86b888c. Read the comment docs.

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

codecov-commenter avatar Oct 20 '25 12:10 codecov-commenter

Added a card for editorial review: DOCS-12375

iadjivon avatar Oct 20 '25 17:10 iadjivon