karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.37k stars 865 forks source link

fix the error of cluster status old condition update will overwrite the newest condition #5227

Closed XiShanYongYe-Chang closed 2 weeks ago

XiShanYongYe-Chang commented 1 month ago

What type of PR is this?

/kind bug /kind failing-test

What this PR does / why we need it:

During the cluster status update, due to the presence of an old Condition in the previous Cluster status, this Condition is incorrectly updated to the Cluster object during the status refresh. The expected Cluster status conditions should no longer include the old condition.

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

`karmada-controller-manager`: Fixed the error of cluster status old condition update will overwrite the newest condition.
codecov-commenter commented 1 month ago

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

Codecov Report

Attention: Patch coverage is 80.64516% with 6 lines in your changes missing coverage. Please review.

Project coverage is 29.66%. Comparing base (51b2e10) to head (b59761e).

Files Patch % Lines
...kg/controllers/status/cluster_status_controller.go 80.64% 4 Missing and 2 partials :warning:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5227 +/- ## ========================================== - Coverage 29.67% 29.66% -0.01% ========================================== Files 632 632 Lines 43901 43915 +14 ========================================== + Hits 13027 13029 +2 - Misses 29931 29939 +8 - Partials 943 947 +4 ``` | [Flag](https://app.codecov.io/gh/karmada-io/karmada/pull/5227/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/karmada-io/karmada/pull/5227/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io) | `29.66% <80.64%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io#carryforward-flags-in-the-pull-request-comment) to find out more.

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

XiShanYongYe-Chang commented 1 month ago

/retest

XiShanYongYe-Chang commented 1 month ago

/cc @zhzhuang-zju @RainbowMango

XiShanYongYe-Chang commented 1 month ago

/retest

XiShanYongYe-Chang commented 1 month ago

/retest

XiShanYongYe-Chang commented 1 month ago

/retest

XiShanYongYe-Chang commented 4 weeks ago

/hold

XiShanYongYe-Chang commented 2 weeks ago

/hold cancel /kind bug

XiShanYongYe-Chang commented 2 weeks ago

/assign @RainbowMango

karmada-bot commented 2 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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: - ~~[pkg/controllers/OWNERS](https://github.com/karmada-io/karmada/blob/master/pkg/controllers/OWNERS)~~ [RainbowMango] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment