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 zero deployment can still propagate to member clusters when EnableEmptyWorkloadPropagation flag is false #3496

Merged
merged 1 commit into from
May 31, 2023

Conversation

chaunceyjiang
Copy link
Member

@chaunceyjiang chaunceyjiang commented May 6, 2023

What type of PR is this?
/kind bug

What this PR does / why we need it:

Fix zero deployment can still propagate to member clusters when EnableEmptyWorkloadPropagation flag is false

Which issue(s) this PR fixes:
Fixes #3495

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

`karmada-scheduler`: Fixed the issue that empty deployment can still be propagated to member clusters even when `--enableEmptyWorkloadPropagation` flag is false.

@karmada-bot karmada-bot added the kind/bug Categorizes issue or PR as related to a bug. label May 6, 2023
@karmada-bot karmada-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 6, 2023
@chaunceyjiang
Copy link
Member Author

EnableEmptyWorkloadPropagation is false.
image

@chaunceyjiang
Copy link
Member Author

EnableEmptyWorkloadPropagation is true.

image

@XiShanYongYe-Chang
Copy link
Member

Thanks, so quick response!
Is it convenient to add some tests to protect it?

@karmada-bot karmada-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 6, 2023
@codecov-commenter
Copy link

codecov-commenter commented May 6, 2023

Codecov Report

Merging #3496 (6dd4a71) into master (2e6962f) will decrease coverage by 0.02%.
The diff coverage is 66.66%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #3496      +/-   ##
==========================================
- Coverage   52.96%   52.94%   -0.02%     
==========================================
  Files         216      216              
  Lines       20014    20019       +5     
==========================================
- Hits        10601    10600       -1     
- Misses       8843     8848       +5     
- Partials      570      571       +1     
Flag Coverage Δ
unittests 52.94% <66.66%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
pkg/util/helper/binding.go 70.28% <66.66%> (-1.04%) ⬇️

... and 2 files with indirect coverage changes

@chaunceyjiang
Copy link
Member Author

/hold

@karmada-bot karmada-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 8, 2023
@chaunceyjiang
Copy link
Member Author

/hold cancel

@karmada-bot karmada-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 9, 2023
@chaunceyjiang
Copy link
Member Author

/cc @XiShanYongYe-Chang @Garrybest

Copy link
Member

@XiShanYongYe-Chang XiShanYongYe-Chang left a comment

Choose a reason for hiding this comment

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

Thanks @chaunceyjiang
/lgtm

I have raise a pr to debug the failed test case, #3518

This error has nothing to do with the current modification. So ask @RainbowMango to help rerun the test.
/cc @RainbowMango

@karmada-bot karmada-bot requested a review from RainbowMango May 11, 2023 02:57
@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label May 11, 2023
@karmada-bot karmada-bot removed the lgtm Indicates that a PR is ready to be merged. label May 15, 2023
@chaunceyjiang chaunceyjiang force-pushed the zero_replicas branch 3 times, most recently from 26ce9ca to 6c6e617 Compare May 23, 2023 01:49
@chaunceyjiang
Copy link
Member Author

/cc @XiShanYongYe-Chang @Garrybest Please take a look.

@karmada-bot karmada-bot removed the lgtm Indicates that a PR is ready to be merged. label May 29, 2023
@chaunceyjiang chaunceyjiang force-pushed the zero_replicas branch 2 times, most recently from 114c9b3 to b63c51d Compare May 29, 2023 12:21
@karmada-bot karmada-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 29, 2023
… still can be propagated to member cluster

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
@Garrybest
Copy link
Member

Thanks!
/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label May 30, 2023
@chaunceyjiang
Copy link
Member Author

@RainbowMango
Copy link
Member

Do you think this patch should be included in v1.6(which will be cut today)?

@chaunceyjiang
Copy link
Member Author

Do you think this patch should be included in v1.6(which will be cut today)?

Yes, i think it is necessar, otherwise, a lot of 'empty shell' in member clusters.

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.

/assign

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

@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 May 31, 2023
@karmada-bot karmada-bot merged commit dff7a5b into karmada-io:master May 31, 2023
@XiShanYongYe-Chang
Copy link
Member

Hi @chaunceyjiang I think we need to cherry-pick this patch to the previous branch, how do you think?

@chaunceyjiang
Copy link
Member Author

OK

karmada-bot added a commit that referenced this pull request Jun 6, 2023
…#3496-origin-release-1.5

Automated cherry pick of #3496: fix When EnableEmptyWorkloadPropagation flag is false zero
karmada-bot added a commit that referenced this pull request Jun 6, 2023
…#3496-origin-release-1.4

Automated cherry pick of #3496: fix When EnableEmptyWorkloadPropagation flag is false zero
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.

When EnableEmptyWorkloadPropagation flag is false zero deployment should not be propagated to member cluster
6 participants