Conversation
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (74.66%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2380 +/- ##
==========================================
+ Coverage 36.97% 37.33% +0.36%
==========================================
Files 287 287
Lines 24257 24664 +407
==========================================
+ Hits 8968 9208 +240
- Misses 14590 14750 +160
- Partials 699 706 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| existingDeployment := &appsv1.Deployment{} | ||
| if err := r.client.Get(ctx, nsName, existingDeployment); err != nil { | ||
| if errors.IsNotFound(err) { | ||
| deleteStatusWithClusterChecksRunner(newStatus, common.ClusterChecksRunnerReconcileConditionType, setClusterChecksRunnerStatus) |
There was a problem hiding this comment.
| deleteStatusWithClusterChecksRunner(newStatus, common.ClusterChecksRunnerReconcileConditionType, setClusterChecksRunnerStatus) | |
| deleteStatusV2WithClusterAgent(newStatus, common.ClusterAgentReconcileConditionType, setClusterAgentStatus) |
This should be DCA I believe ? Not sure how we can enter this condition tho to verify
There was a problem hiding this comment.
Correct thanks for catching updated 77e27a5.
There was a problem hiding this comment.
I believe it should also be common.ClusterAgentReconcileConditionType as the argument
| // getDeploymentNameFromCCR returns the expected CCR deployment name based on | ||
| // the DDA name and clusterChecksRunner name override | ||
| func getDeploymentNameFromCCR(dda *datadoghqv2alpha1.DatadogAgent) string { | ||
| deploymentName := clusterchecksrunner.GetClusterChecksRunnerName(dda) | ||
| if componentOverride, ok := dda.Spec.Override[datadoghqv2alpha1.ClusterChecksRunnerComponentName]; ok { | ||
| if componentOverride.Name != nil && *componentOverride.Name != "" { | ||
| deploymentName = *componentOverride.Name | ||
| } | ||
| } | ||
| return deploymentName | ||
| } |
There was a problem hiding this comment.
@ Timothée: common.GetDeploymentNameFromDatadogAgent gets DCA and does the same thing as this for CCR, only change is component + GetClusterAgentName vs GetClusterChecksRunnerName -> getComponentDeployNameFromDDA(ddaObject, ddaSpec, componentName) + getComponentName(dda, component)
* Checkpoint: updated components from #2380 refactor; moved/updated tests/utils; test pass * Add DDAI support to controller_reconcile_deployment_test.go (disabled) * Minor signature alignments * Separate deployment deletion and status handling in cleanupV2*** function * move cleanupV2*** out of component * Last step in aligning component Cleanup and Reconcile functions * Move Reconcile to ComponentReconciler and drop from interface * Move Cleanup to ComponentReconciler and drop from interface * Update ddot gateway component, add test * Fix bug when component is not required but override is available leading to deployment creation * Apply suggestions from code review Co-authored-by: Timothée Bavelier <97530782+tbavelier@users.noreply.github.com> * update status timestamp --------- Co-authored-by: Timothée Bavelier <97530782+tbavelier@users.noreply.github.com>
What does this PR do?
cleanupOldCCR**function to file where it's used. Changed some log lines, variable names.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?
Describe your test plan
Write there any instructions and details you may have to test your PR.
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel