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: validate update AdvancedDaemonSet #1505

Merged
merged 2 commits into from Mar 8, 2024

Conversation

hantmac
Copy link
Member

@hantmac hantmac commented Feb 18, 2024

Ⅰ. Describe what this PR does

Fix #1498

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Run test TestValidateDaemonSetUpdate or update Advanced DaemonSet Spec.Selector will get error

Ⅳ. Special notes for reviews

@kruise-bot kruise-bot added the size/L size/L: 100-499 label Feb 18, 2024
Copy link

codecov bot commented Feb 18, 2024

Codecov Report

Attention: Patch coverage is 34.78261% with 30 lines in your changes are missing coverage. Please review.

Project coverage is 47.81%. Comparing base (5421ee7) to head (603a441).
Report is 6 commits behind head on master.

Files Patch % Lines
...nset/validating/daemonset_create_update_handler.go 33.33% 30 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1505      +/-   ##
==========================================
- Coverage   48.55%   47.81%   -0.75%     
==========================================
  Files         157      161       +4     
  Lines       22480    23395     +915     
==========================================
+ Hits        10916    11187     +271     
- Misses      10360    10995     +635     
- Partials     1204     1213       +9     
Flag Coverage Δ
unittests 47.81% <34.78%> (-0.75%) ⬇️

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.

@zmberg
Copy link
Member

zmberg commented Feb 20, 2024

@hantmac your UT coverage is estimated to be a bit fuller.
image

@hantmac
Copy link
Member Author

hantmac commented Feb 20, 2024

@hantmac your UT coverage is estimated to be a bit fuller. image

These test cover the added code. I can't add more UT 😢

@furykerry
Copy link
Member

These test cover the added code. I can't add more UT

can you modify the UT to invoke DaemonSetCreateUpdateHandler.Handle function, UT should cover the published function

@kruise-bot kruise-bot added size/XL size/XL: 500-999 and removed size/L size/L: 100-499 labels Feb 24, 2024
@hantmac
Copy link
Member Author

hantmac commented Feb 24, 2024

These test cover the added code. I can't add more UT

can you modify the UT to invoke DaemonSetCreateUpdateHandler.Handle function, UT should cover the published function

It sounds somewhat unreasonable. It seems like for the sake of UT, just UT 🤔

@zmberg zmberg modified the milestones: v1.5, 1.6 Mar 7, 2024
Copy link
Member

@furykerry furykerry left a comment

Choose a reason for hiding this comment

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

/lgtm

Signed-off-by: hantmac <hantmac@outlook.com>

refactor it

fix

fix

Signed-off-by: hantmac <hantmac@outlook.com>
Signed-off-by: hantmac <hantmac@outlook.com>
@zmberg
Copy link
Member

zmberg commented Mar 8, 2024

/lgtm

@zmberg
Copy link
Member

zmberg commented Mar 8, 2024

/approve

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zmberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kruise-bot kruise-bot merged commit 209d476 into openkruise:master Mar 8, 2024
25 of 27 checks passed
ppbits pushed a commit to ppbits/kruise that referenced this pull request Apr 4, 2024
* fix: validate update AdvancedDaemonSet


refactor it

fix

fix


* fix ut


---------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Advanced DaemonSet 修改 Spec.Selector 导致旧 pod 残留
4 participants