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 the issue of residual work in the MultiClusterService feature. #5188

Merged

Conversation

XiShanYongYe-Chang
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

The finalizer MCSEndpointSliceDispatchControllerFinalizer was added too late, and when the dispatched work is still in the process of creating, deleting the MultiClusterService object may result in residual dispatched work resources.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

karmada-controller-manager: fix the issue of residual work in the MultiClusterService feature.

@karmada-bot karmada-bot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 13, 2024
@karmada-bot karmada-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 13, 2024
@XiShanYongYe-Chang XiShanYongYe-Chang changed the title Fix the issue of residual work in the MultiClusterService feature. [WIP] Fix the issue of residual work in the MultiClusterService feature. Jul 13, 2024
@karmada-bot karmada-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 13, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 13, 2024

⚠️ 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 8 lines in your changes missing coverage. Please review.

Project coverage is 28.23%. Comparing base (d3adcf6) to head (fc73d67).

Files Patch % Lines
...clusterservice/endpointslice_collect_controller.go 0.00% 6 Missing ⚠️
...lusterservice/endpointslice_dispatch_controller.go 0.00% 1 Missing ⚠️
pkg/util/helper/work.go 0.00% 1 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5188      +/-   ##
==========================================
- Coverage   28.23%   28.23%   -0.01%     
==========================================
  Files         632      632              
  Lines       43712    43713       +1     
==========================================
- Hits        12344    12343       -1     
- Misses      30465    30467       +2     
  Partials      903      903              
Flag Coverage Δ
unittests 28.23% <0.00%> (-0.01%) ⬇️

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.

Signed-off-by: changzhen <changzhen5@huawei.com>
@XiShanYongYe-Chang XiShanYongYe-Chang changed the title [WIP] Fix the issue of residual work in the MultiClusterService feature. Fix the issue of residual work in the MultiClusterService feature. Jul 13, 2024
@karmada-bot karmada-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 13, 2024
@XiShanYongYe-Chang
Copy link
Member Author

/cc @RainbowMango

@XiShanYongYe-Chang
Copy link
Member Author

/cc @chaosi-zju

@chaosi-zju
Copy link
Member

/lgtm thanks

@chaosi-zju
Copy link
Member

So, before this fix introduced, if the deletion of eps happens to occur within the short limit time after the creation of Work and before the creation of Finalizer, it will lead to the problem of residual work, which is guaranteed after this modification. 👍

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/approve
It makes sense to append the finalizer during born.

@karmada-bot
Copy link
Collaborator

[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:

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

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 17, 2024
@RainbowMango
Copy link
Member

/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 17, 2024
@RainbowMango RainbowMango added this to the v1.11 milestone Jul 17, 2024
@karmada-bot karmada-bot merged commit a5070c7 into karmada-io:master Jul 17, 2024
12 checks passed
karmada-bot added a commit that referenced this pull request Jul 17, 2024
…k-of-#5188-upstream-release-1.10

Automated cherry pick of #5188: Fix the issue of residual work in the MultiClusterService
karmada-bot added a commit that referenced this pull request Jul 17, 2024
…k-of-#5188-upstream-release-1.9

Automated cherry pick of #5188: Fix the issue of residual work in the MultiClusterService
@XiShanYongYe-Chang XiShanYongYe-Chang deleted the fix-residual-work-in-mcs branch July 17, 2024 08:33
karmada-bot added a commit that referenced this pull request Jul 17, 2024
…k-of-#5188-upstream-release-1.8

Automated cherry pick of #5188: Fix the issue of residual work in the MultiClusterService
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants