-
Notifications
You must be signed in to change notification settings - Fork 891
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
GroupClusters should sort by score and availableReplica count #5144
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5144 +/- ##
==========================================
+ Coverage 28.21% 28.22% +0.01%
==========================================
Files 632 632
Lines 43568 43548 -20
==========================================
+ Hits 12291 12292 +1
+ Misses 30381 30359 -22
- Partials 896 897 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
7007fc2
to
6339c67
Compare
@@ -17,6 +17,8 @@ limitations under the License. | |||
package spreadconstraint | |||
|
|||
import ( | |||
"k8s.io/utils/ptr" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth noting - the linter was failing because the original import (k8s.io/utils/pointer
) is deprecated. This new import will work for newer karmada versions, but is not currently compatible with the version we use (v1.9.0) because it uses an older k8s-util version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the information.
I wonder if you maintain some private commits based on v1.9.0?
I'm asking because I want to know if this going to be a problem for you. I mean if this patch not present on release 1.9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a couple private commits on our v1.9.0 branch, but most of them we are planning to contribute via our published proposals. I think we can try updating to the v1.10.0 release branch which will have the updated k8s-util version and can pick up this commit. I'll test v1.10 with out setup and confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed changes work with v1.10 - I think we can move forward with upgrading our local Karmada version.
/assign @whitewindmills |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
note that you need to squash your commits
Signed-off-by: mszacillo <mszacillo@bloomberg.net>
6339c67
to
01be91b
Compare
Thanks for the review - squashed my commits. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: whitewindmills 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 |
/lgtm |
@whitewindmills Will this commit be cherrypicked into the v1.10 release branch? |
Normally we don't backport this kind of PR, but this seems no harm/risk in doing that, so I'm happy to backport it to meet users' expectations. If no objection from @whitewindmills, we can do that. (PS: there is a doc explains how to cherry-pick PRs) |
I'm ok with this. |
…4-upstream-release-1.10 Automated cherry pick of #5144: GroupClusters should sort by score and availableReplica count
What type of PR is this?
/kind feature
What this PR does / why we need it:
With the PR, Karmada will sort clusterInfo by score, and fallback to sorting by availableReplicas. This will help cases in which some clusters have the same score, but we should prefer scheduling on clusters with higher availableReplicas.
Which issue(s) this PR fixes:
Fixes #5129
Does this PR introduce a user-facing change?: