-
Notifications
You must be signed in to change notification settings - Fork 223
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: check if RGs is updated #1356
Conversation
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
Hi @KunWuLuan. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
/ok-to-test |
@@ -1075,6 +1075,36 @@ var _ = ginkgo.Describe("Scheduler", func() { | |||
util.ExpectWorkloadsToHaveQuotaReservation(ctx, k8sClient, devCQ.Name, dWl1) | |||
}) | |||
|
|||
ginkgo.It("Should try next flavor instead of pending", func() { |
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.
@nstogner any other integration test you would like to see?
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.
This approach looks good to me. I'll leave review and approve to @alculquicondor.
/uncc
pkg/cache/clusterqueue.go
Outdated
@@ -225,7 +227,9 @@ func (c *ClusterQueue) updateResourceGroups(in []kueue.ResourceGroup) { | |||
rg.Flavors = append(rg.Flavors, fQuotas) | |||
} | |||
} | |||
c.AllocatableResourceGeneration++ | |||
if !reflect.DeepEqual(oldRG, c.ResourceGroups) { |
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.
One consideration. I'm wondering if we should decide which DeepEqual
we should use. reflect
pkg vs equality.Semantic
pkg.
However, I think this is out of the scope of this PR.
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 are using equality everywhere else, so we should stick with it.
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 could see the case for using reflect
package here:
Lines 119 to 129 in 1ecd79f
if o.LeaseDuration == nil && !reflect.DeepEqual(cfg.LeaderElection.LeaseDuration, metav1.Duration{}) { | |
o.LeaseDuration = &cfg.LeaderElection.LeaseDuration.Duration | |
} | |
if o.RenewDeadline == nil && !reflect.DeepEqual(cfg.LeaderElection.RenewDeadline, metav1.Duration{}) { | |
o.RenewDeadline = &cfg.LeaderElection.RenewDeadline.Duration | |
} | |
if o.RetryPeriod == nil && !reflect.DeepEqual(cfg.LeaderElection.RetryPeriod, metav1.Duration{}) { | |
o.RetryPeriod = &cfg.LeaderElection.RetryPeriod.Duration | |
} |
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.
However, I agree with using equality
everywhere.
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.
Have changed reflect.DeepEqual to equality.Semantic.DeepEqual, thanks
Cohort("all"). | ||
ResourceGroup( | ||
*testing.MakeFlavorQuotas("on-demand").Resource(corev1.ResourceCPU, "2").Obj(), | ||
*testing.MakeFlavorQuotas("spot-untainted").Resource(corev1.ResourceCPU, "2").Obj()). |
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 just noticed that this doesn't have fungibility or preemption policies set. Was it failing even without fungibility police?
I addressed my own comments here 0cef5b3 But I discovered that the solution is incomplete: it doesn't work for BestEffortFIFO. Feel free to cherry-pick my commit and continue working on this. |
I opened a new PR that addresses both issues #1366 |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: KunWuLuan 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 |
@KunWuLuan: The following tests 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. |
Thanks |
@alculquicondor: Closed this PR. 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. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fix #1344
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
No