-
Notifications
You must be signed in to change notification settings - Fork 298
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
Make Preemption.BorrowWithinCohort Incompatible with FairSharing #4298
base: main
Are you sure you want to change the base?
Make Preemption.BorrowWithinCohort Incompatible with FairSharing #4298
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: gabesaba 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 |
✅ Deploy Preview for kubernetes-sigs-kueue ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Just some nits. basically lgtm, thanks!
var allErrs field.ErrorList | ||
if preemption.ReclaimWithinCohort == kueue.PreemptionPolicyNever && | ||
preemption.BorrowWithinCohort != nil && | ||
preemption.BorrowWithinCohort.Policy != kueue.BorrowWithinCohortPolicyNever { | ||
allErrs = append(allErrs, field.Invalid(path, preemption, "reclaimWithinCohort=Never and borrowWithinCohort.Policy!=Never")) | ||
} | ||
if w.fairSharingEnabled && preemption.BorrowWithinCohort != nil && preemption.BorrowWithinCohort.Policy != kueue.BorrowWithinCohortPolicyNever { | ||
allErrs = append(allErrs, field.Invalid(path, preemption.BorrowWithinCohort, "FairSharing incompatible with borrowWithinCohort")) |
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.
allErrs = append(allErrs, field.Invalid(path, preemption.BorrowWithinCohort, "FairSharing incompatible with borrowWithinCohort")) | |
allErrs = append(allErrs, field.Invalid(path.Child("borrowWithinCohort").Child("policy"), preemption.BorrowWithinCohort.Policy, "FairSharing incompatible with borrowWithinCohort except for Never policy")) |
Actually, this incompatible came from policy, right?
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.
Nice these UTs!
I think this actually enhancement to improve UX. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
With #4165, these parameters together becomes a no-op.
Based on #4165 (comment), we decided to split out the logic and documentation change from the validation changes, as we may only cherry-pick the first set.
Which issue(s) this PR fixes:
Related to #3779
Special notes for your reviewer:
Does this PR introduce a user-facing change?