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

Consolidate versionInfo and platformInfo #1436

Merged
merged 21 commits into from
Oct 3, 2024

Conversation

mrdoggopat
Copy link
Contributor

What does this PR do?

Cleanup the unused versionInfo and consolidate this to kubernetes.platformInfo. version.Info is duplicated in the store since kubernetes.platformInfo contains the same version.Info.

A brief description of the change being made with this pull request.

CECO-415

What inspired you to submit this pull request?
N/A

Anything else we should know when reviewing?
N/A

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
N/A

Describe your test plan

Write there any instructions and details you may have to test your PR.
Spin up a k8s cluster below and above version 1.22.

Check if the ShouldCreateAgentLocalService function (https://github.com/DataDog/datadog-operator/blob/main/internal/controller/datadogagent/common/utils.go#L128-L134) works the same way after the change:

  • For k8s clusters above version 1.22, the local service for the Datadog agent gets created.
  • For k8s clusters below version 1.22, the service does not get created.

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

@mrdoggopat mrdoggopat requested a review from a team as a code owner September 24, 2024 19:22
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, refactoring, documentation, tooling, dependencies

@mrdoggopat mrdoggopat added the enhancement New feature or request label Sep 24, 2024
@mrdoggopat mrdoggopat added this to the v1.10.0 milestone Sep 24, 2024
@mrdoggopat mrdoggopat changed the title consolidate versionInfo and platformInfo Consolidate versionInfo and platformInfo Sep 24, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 43.18182% with 25 lines in your changes missing coverage. Please review.

Project coverage is 48.95%. Comparing base (a97d755) to head (96def9d).

Files with missing lines Patch % Lines
internal/controller/setup.go 47.61% 10 Missing and 1 partial ⚠️
internal/controller/datadogslo/controller.go 25.00% 3 Missing ⚠️
...al/controller/datadogagent/feature/otlp/feature.go 50.00% 0 Missing and 2 partials ⚠️
pkg/kubernetes/platforminfo.go 0.00% 2 Missing ⚠️
...nal/controller/datadogagent/feature/apm/feature.go 50.00% 0 Missing and 1 partial ⚠️
...ntroller/datadogagent/feature/dogstatsd/feature.go 50.00% 0 Missing and 1 partial ⚠️
...er/datadogagent/feature/externalmetrics/feature.go 50.00% 0 Missing and 1 partial ⚠️
internal/controller/datadogdashboard/controller.go 50.00% 1 Missing ⚠️
internal/controller/datadogdashboard_controller.go 0.00% 1 Missing ⚠️
internal/controller/datadogmonitor/controller.go 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1436      +/-   ##
==========================================
+ Coverage   48.92%   48.95%   +0.02%     
==========================================
  Files         223      223              
  Lines       19438    19433       -5     
==========================================
+ Hits         9511     9513       +2     
+ Misses       9438     9431       -7     
  Partials      489      489              
Flag Coverage Δ
unittests 48.95% <43.18%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
internal/controller/datadogagent/controller.go 55.17% <ø> (+1.83%) ⬆️
...controller/datadogagent/controller_reconcile_v2.go 54.11% <ø> (-0.20%) ⬇️
internal/controller/datadogagent/store/store.go 65.23% <ø> (+0.75%) ⬆️
internal/controller/datadogagent_controller.go 70.00% <100.00%> (ø)
internal/controller/datadogmonitor_controller.go 52.94% <100.00%> (ø)
...nal/controller/datadogagent/feature/apm/feature.go 64.41% <50.00%> (+0.12%) ⬆️
...ntroller/datadogagent/feature/dogstatsd/feature.go 74.68% <50.00%> (+0.16%) ⬆️
...er/datadogagent/feature/externalmetrics/feature.go 54.16% <50.00%> (+0.19%) ⬆️
internal/controller/datadogdashboard/controller.go 46.10% <50.00%> (+0.29%) ⬆️
internal/controller/datadogdashboard_controller.go 0.00% <0.00%> (ø)
... and 6 more

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 a97d755...96def9d. Read the comment docs.

@mrdoggopat mrdoggopat added refactoring and removed enhancement New feature or request labels Sep 24, 2024
remove commented versionInfo
remove commented versionInfo
remove commented versionInfo
remove commented versionInfo
remove commented versionInfo
@khewonc khewonc merged commit 7984f26 into main Oct 3, 2024
19 checks passed
@khewonc khewonc deleted the mrmcpat-consolidate-versioninfo-and-platforminfo branch October 3, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants