-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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 ImageLocality plugin score is inconsistent #116938
fix ImageLocality plugin score is inconsistent #116938
Conversation
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Mon Mar 27 04:26:09 UTC 2023. |
|
Welcome @olderTaoist! |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @olderTaoist. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
252e03b
to
acdaff5
Compare
@olderTaoist: GitHub didn't allow me to request PR reviews from the following users: PTAL. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign |
/ok-to-test |
3056bf8
to
01e110d
Compare
73e2ed7
to
22b6f2a
Compare
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.
Another round of review, and FYI, the code freezing is approaching, I noticed you have pushed some additional commits but they are not shown up here.
@@ -433,8 +433,21 @@ func getNamespacesFromPodAffinityTerm(pod *v1.Pod, podAffinityTerm *v1.PodAffini | |||
type ImageStateSummary struct { | |||
// Size of the image | |||
Size int64 | |||
// Used to track how many nodes have this image | |||
// Used to track how many nodes have this image, It is computed from the Nodes field below | |||
// during the execution of Snapshot. |
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.
I am thinking this might cause the inconsistency for how it is defined and used, how about remove the NumNodes
field and just use len(Nodes) for where it is used? while removing it means more changes will be needed, ping @alculquicondor @ahg-g @kerthcet for thoughts.
i just squash commit as @ahg-g suggestion. there are no more change. |
5d0e171
to
e58a085
Compare
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.
It's quite a long time, but I still see some pending review comments there. I'd suggest to ask for review only in case all those comments are either addressed or replied.
e58a085
to
9fa1162
Compare
all comment addressed, i just figured out how to mark comment as addressed |
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.
Generally LGTM.
Ideally, the fix in pkg/scheduler/framework/types.go
and the refactoring around snapshot
renaming along with the removing of imageState
struct should be organized in different commits, the change like this is hard to review TBH.
pls double check the logic around this comments:
https://github.com/kubernetes/kubernetes/pull/116938/files#r1249435336
/cc @kubernetes/sig-scheduling-approvers
for a double check and approval.
@chendave: GitHub didn't allow me to request PR reviews from the following users: kubernetes/sig-scheduling-approvers. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
looks good to me, just change the DeepEqual to diff.cmp pls
9fa1162
to
5d5958e
Compare
/lgtm thanks! |
LGTM label has been added. Git tree hash: e9bf9e42b60ee4765be46dade60b04caee81956a
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahg-g, olderTaoist 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 |
/hold cancel |
/test pull-kubernetes-e2e-gce |
@olderTaoist: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
What type of PR is this?
/kind bug
the older manner is that update the
NodeInfo.ImageStates
field when receive add/update/delete event, but doesn't updateImageStates
of the existNodeInfo
when receive node add event, this manner cause inconsistent of ImageLocality plugin.the new manner is that update the
cache.imageStates
field when receive add/update/delete event, updateImageStates
of the exist
NodeInfo
according tocache.imageStates
when beginning to schedule pod(inUpdateSnapshot
function)Which issue(s) this PR fixes:
Fixes #116673
Does this PR introduce a user-facing change?