karmada-io / karmada

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

skip the filter if the cluster is already in the list of scheduling result even if the API is missed #5216

Open yanfeng1992 opened 1 month ago

yanfeng1992 commented 1 month ago

Signed-off-by: huangyanfeng huangyanfeng1992@gmail.com

What type of PR is this? /kind bug

What this PR does / why we need it:

Because when obtaining APIEnablements, it may be empty or partial. This will cause the scheduler to delete the scheduling results, resulting in incorrect deletion

So if the cluster is already in the list of scheduling results, even if the API is not hit, skip the filter

https://github.com/karmada-io/karmada/blob/a87ec2a61abadf9f102440b1f64cf338b2ee5518/pkg/controllers/status/cluster_status_controller.go#L233-L239

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

karmada-bot commented 1 month ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign garrybest for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files: - **[pkg/scheduler/OWNERS](https://github.com/karmada-io/karmada/blob/master/pkg/scheduler/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
yanfeng1992 commented 1 month ago

/retest

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 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 28.24%. Comparing base (a87ec2a) to head (5a4f42b). Report is 8 commits behind head on master.

Files Patch % Lines
.../framework/plugins/apienablement/api_enablement.go 0.00% 5 Missing :warning:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5216 +/- ## ======================================= Coverage 28.23% 28.24% ======================================= Files 632 632 Lines 43723 43726 +3 ======================================= + Hits 12345 12350 +5 + Misses 30473 30472 -1 + Partials 905 904 -1 ``` | [Flag](https://app.codecov.io/gh/karmada-io/karmada/pull/5216/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/5216/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io) | `28.24% <0.00%> (+<0.01%)` | :arrow_up: | 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

Thanks for your feedback @yanfeng1992

Because when obtaining APIEnablements, it may be empty or partial.

When will that happen?

chaunceyjiang commented 1 month ago

When will that happen?

I guess it's when the status of AA is false?

yanfeng1992 commented 1 month ago

When will that happen?

I guess it's when the status of AA is false?

When the AA status is false and the cluster status is healthy

XiShanYongYe-Chang commented 1 month ago

Thanks @chaunceyjiang @yanfeng1992 , I get it.

yanfeng1992 commented 4 weeks ago

/assign @XiShanYongYe-Chang