Conversation
khewonc
commented
Mar 3, 2026
| func (r *Reconciler) overrideDependencies(logger logr.Logger, resourceManagers feature.ResourceManagers, instance *datadoghqv1alpha1.DatadogAgentInternal) error { | ||
| errs := override.Dependencies(logger, resourceManagers, instance.GetObjectMeta(), &instance.Spec) | ||
| func (r *Reconciler) overrideDependencies(ctx context.Context, resourceManagers feature.ResourceManagers, instance *datadoghqv1alpha1.DatadogAgentInternal) error { | ||
| errs := override.Dependencies(ctrl.LoggerFrom(ctx), resourceManagers, instance.GetObjectMeta(), &instance.Spec) |
Collaborator
Author
There was a problem hiding this comment.
override.Dependencies is also used in controller v2, which I'm not going to modify to use context based logging since it won't be used starting in operator 1.27. This can be changed to pass context instead of logging then
gabedos
approved these changes
Mar 3, 2026
Contributor
gabedos
left a comment
There was a problem hiding this comment.
Continuing migration to use context based logger looks good to me!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Pass context instead of logger in functions
Motivation
https://datadoghq.atlassian.net/browse/CONTP-1334
Follow-up to #2519
Additional Notes
Skipping DDA v2 reconcile methods
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
Logs will mostly be the same as before. The main differences are:
Delete DaemonSet→Deleted DaemonSetfor DS deletionDelete DaemonSet→Deleted ExtendedDaemonSetfor EDS deletionChecklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel