katalyst-core icon indicating copy to clipboard operation
katalyst-core copied to clipboard

fix: fix nil panic when update tideNodePool fail in Tide.Reconcile

Open ikaven1024 opened this issue 1 year ago • 2 comments

What type of PR is this?

Bug fixes

What this PR does / why we need it:

https://github.com/kubewharf/katalyst-core/blob/5c0c031d5c172cbe6e176b5ab6499c63a7063f14/pkg/controller/tide/tide.go#L334-L346

When TideNodePool update failed, tideNodePool is set to be nil, and logging tideNodePool.Name will panic.

Which issue(s) this PR fixes:

Special notes for your reviewer:

ikaven1024 avatar Sep 06 '24 09:09 ikaven1024

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 06 '24 09:09 CLAassistant

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 57.23%. Comparing base (cf87c77) to head (d5f3da7). :warning: Report is 782 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #695      +/-   ##
==========================================
+ Coverage   57.04%   57.23%   +0.19%     
==========================================
  Files         556      568      +12     
  Lines       53320    54665    +1345     
==========================================
+ Hits        30417    31289     +872     
- Misses      19080    19453     +373     
- Partials     3823     3923     +100     
Flag Coverage Δ
unittest 57.23% <100.00%> (+0.19%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Sep 06 '24 09:09 codecov[bot]