Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix log line formatting for conflicting profiles #1115

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

khewonc
Copy link
Contributor

@khewonc khewonc commented Mar 7, 2024

What does this PR do?

Log line formatting was not correct.

Before: {"level":"INFO","ts":"2024-03-07T19:44:50Z","logger":"controllers.DatadogAgent","msg":"profile %s conflicts with existing profile %s, skipping","datadogagent":"default/datadog","default/dap-conflict":"default/dap-test"}

After: {"level":"INFO","ts":"2024-03-07T19:55:56Z","logger":"controllers.DatadogAgent","msg":"conflict with existing profile, skipping","datadogagent":"default/datadog","conflicting profile":"default/dap-conflict","existing profile":"default/dap-test"}

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: n/a
  • Cluster Agent: n/a

Describe your test plan

Enable profiles, and add 2 profiles that target the same node. The operator logs should show that there is profile conflict without formatting errors

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

@khewonc khewonc added the bug Something isn't working label Mar 7, 2024
@khewonc khewonc added this to the v1.5.0 milestone Mar 7, 2024
@khewonc khewonc requested review from a team as code owners March 7, 2024 20:03
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.93%. Comparing base (09b69b7) to head (7b72cc2).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1115   +/-   ##
=======================================
  Coverage   58.93%   58.93%           
=======================================
  Files         174      174           
  Lines       21351    21351           
=======================================
  Hits        12583    12583           
  Misses       8003     8003           
  Partials      765      765           
Flag Coverage Δ
unittests 58.93% <100.00%> (ø)

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

Files Coverage Δ
pkg/agentprofile/agent_profile.go 75.94% <100.00%> (ø)

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 09b69b7...7b72cc2. Read the comment docs.

@khewonc khewonc merged commit 3f21618 into main Mar 7, 2024
21 checks passed
@khewonc khewonc deleted the khewonc/profile-conflict-log-line branch March 7, 2024 20:13
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.

3 participants