-
Notifications
You must be signed in to change notification settings - Fork 1k
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 session JobOrderFn to be predictable #3960
base: master
Are you sure you want to change the base?
Conversation
- This fixes an issue we've been seeing where the JobOrder doesn't return the same consistent list order when compared by job UUID. We are ordering by Job Name now - Additionally it makes sure that when two jobs have the same score the list is always in the consistent order. We are also ordering by Job Name. Signed-off-by: Ricardo Aravena <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Yes, we'd better create an issue to let other contributors trace back why this was changed. |
Thanks! Will get back to you on the exact issue, but I believe with UID we were getting different orders. |
return lv.UID < rv.UID | ||
// Use the Name of the Job instead of UID to get deterministic order by Job name | ||
klog.V(3).Infof("Creation timestamps are the same for job %v and %v: %v . using name to order", lv.Name, rv.Name, lv.CreationTimestamp) | ||
return lv.Name < rv.Name |
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.
If we encounter a situation where vcjobs have the same name but are in different namespaces, will the JobOrder still not return a consistent list order?
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.
Good question. So Job Names are namespaced?
Created ticket #3962 with more details |
Hi, I have some comments about your issue description, please check it |
What type of PR is this?
/kind bug
/area scheduling
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes # #3962
Special notes for your reviewer:
Do we need to open an issue?
Does this PR introduce a user-facing change?