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

feat: improve DaemonSet upgrade models check (#1869) #1898

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

huangchenzhao
Copy link
Member

@huangchenzhao huangchenzhao commented Jan 8, 2024

What type of PR is this?

/kind good-first-issue
/kind feature

What this PR does / why we need it:

Check upgrade models AdvancedRollingUpdate, OTA and AutoUpdate by using case-insensitive string judgment instead of using "==".

By introducing:

  1. strings.ToLower(stringA) to entire small letters before models check.
  2. strings.EqualFold(stringA, stringB) directly check models.

we can ignore the difference between upper and lower case before models check.

Which issue(s) this PR fixes:

Fixes #1869

Signed-off-by: Chenzhao Huang <949412843@qq.com>
Copy link

sonarcloud bot commented Jan 8, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Jan 8, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (d1a8b03) 52.13% compared to head (d70ea19) 52.18%.
Report is 2 commits behind head on master.

Files Patch % Lines
.../daemonpodupdater/daemon_pod_updater_controller.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1898      +/-   ##
==========================================
+ Coverage   52.13%   52.18%   +0.05%     
==========================================
  Files         172      172              
  Lines       20882    20882              
==========================================
+ Hits        10886    10898      +12     
+ Misses       9028     9017      -11     
+ Partials      968      967       -1     
Flag Coverage Δ
unittests 52.18% <75.00%> (+0.05%) ⬆️

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.

@rambohe-ch
Copy link
Member

/rerun

@rambohe-ch
Copy link
Member

/lgtm

@rambohe-ch rambohe-ch added approved approved lgtm lgtm labels Jan 8, 2024
@rambohe-ch rambohe-ch merged commit 207dade into openyurtio:master Jan 8, 2024
13 checks passed
zyjhtangtang pushed a commit to zyjhtangtang/openyurt that referenced this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved lgtm lgtm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request]improve DaemonSet upgrade models check
2 participants