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

Don't update k8s-settings object, if already present #3886

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

0sewa0
Copy link
Contributor

@0sewa0 0sewa0 commented Oct 4, 2024

Description

K8S-11513

If we update the k8s settings object that already exists, for some reason causes data gaps.

We should avoid updating it, as it was done before v1.3

The diff looks a bit confusing:

  • I just moved the settings.TotalCount > 0 check(and related calls) , before the r.dtc.CreateOrUpdateKubernetesSetting(... call

How can this be tested?

There was a unit-test that was supposed to test for this.

  • I fixed it, now it fails with the old logic

Otherwise you have to make it update, and see gaps in the collected data

@0sewa0 0sewa0 added the bug Something isn't working label Oct 4, 2024
@0sewa0 0sewa0 requested a review from a team as a code owner October 4, 2024 10:09
@0sewa0 0sewa0 requested review from gkrenn, chrismuellner, albertogdd, waodim, StefanHauth, aorcholski and luhi-DT and removed request for a team October 4, 2024 10:09
@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.

Project coverage is 64.34%. Comparing base (05257c8) to head (8bb9a49).
Report is 1 commits behind head on release-1.3.

Files with missing lines Patch % Lines
...g/controllers/dynakube/apimonitoring/reconciler.go 55.55% 3 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##           release-1.3    #3886   +/-   ##
============================================
  Coverage        64.34%   64.34%           
============================================
  Files              353      353           
  Lines            19012    19012           
============================================
  Hits             12233    12233           
  Misses            5526     5526           
  Partials          1253     1253           
Flag Coverage Δ
unittests 64.34% <55.55%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@0sewa0 0sewa0 enabled auto-merge (squash) October 8, 2024 07:43
@0sewa0 0sewa0 merged commit da06480 into release-1.3 Oct 8, 2024
15 checks passed
@0sewa0 0sewa0 deleted the fix/never-update-k8s-settings-object branch October 8, 2024 07:51
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