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

Implement label and annotation equality checking #1467

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

khewonc
Copy link
Contributor

@khewonc khewonc commented Oct 16, 2024

What does this PR do?

Implements checking for differences in annotations and labels for objects.

Motivation

Unable to update service account annotations when qa'ing #1425

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

  override:
    nodeAgent:
      serviceAccountAnnotations:
        foo: bar
        one: two
    clusterAgent:
      serviceAccountAnnotations:
        d: ca
        a: c
    clusterChecksRunner:
      serviceAccountAnnotations:
        a: b
  • Update serviceAccountAnnotations in the DDA and ensure the annotations are updated in the service accounts

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 bug Something isn't working enhancement New feature or request labels Oct 16, 2024
@khewonc khewonc added this to the v1.10.0 milestone Oct 16, 2024
@khewonc khewonc requested a review from a team as a code owner October 16, 2024 19:05
@codecov-commenter
Copy link

codecov-commenter commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.86%. Comparing base (ae4c939) to head (d5207f1).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1467      +/-   ##
==========================================
- Coverage   48.94%   48.86%   -0.08%     
==========================================
  Files         223      223              
  Lines       19758    19756       -2     
==========================================
- Hits         9670     9654      -16     
- Misses       9578     9595      +17     
+ Partials      510      507       -3     
Flag Coverage Δ
unittests 48.86% <100.00%> (-0.08%) ⬇️

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

Files with missing lines Coverage Δ
pkg/equality/equality.go 2.48% <100.00%> (-9.79%) ⬇️

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 ae4c939...d5207f1. Read the comment docs.

Copy link
Member

@tbavelier tbavelier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor typo on last test

pkg/equality/equality_test.go Outdated Show resolved Hide resolved
@khewonc khewonc merged commit b0f2dd6 into main Oct 17, 2024
19 checks passed
@khewonc khewonc deleted the khewonc/metadata-equality branch October 17, 2024 14:23
khewonc added a commit that referenced this pull request Oct 17, 2024
* Implement label and annotation equality checking

* Update pkg/equality/equality_test.go

Co-authored-by: Timothée Bavelier <[email protected]>

---------

Co-authored-by: Timothée Bavelier <[email protected]>
khewonc added a commit that referenced this pull request Oct 17, 2024
* Implement label and annotation equality checking

* Update pkg/equality/equality_test.go



---------

Co-authored-by: Timothée Bavelier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants