-
Notifications
You must be signed in to change notification settings - Fork 480
Introduce FS at admission time #4687
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
Introduce FS at admission time #4687
Conversation
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
|
@PBundyra: GitHub didn't allow me to assign the following users: pajakd. Note that only kubernetes-sigs members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. |
a6bef60 to
b0e124a
Compare
|
/retest |
03c713d to
45ac937
Compare
|
Just to be sure about the scope here -- by "Changes described in the first phase of #4252" you mean CQ + LQ level support, right (so no cohorts yet)? |
Exactly |
gabesaba
left a comment
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.
First pass. Let's iron out the API, and interaction with other FS mode, as this will be difficult to change later
53b0c21 to
51a869f
Compare
test/integration/singlecluster/scheduler/fairsharing/fair_sharing_test.go
Outdated
Show resolved
Hide resolved
test/integration/singlecluster/scheduler/fairsharing/fair_sharing_test.go
Outdated
Show resolved
Hide resolved
pkg/queue/cluster_queue.go
Outdated
| lqBUsage, errB := b.LqUsage(ctx, c, fsResWeights) | ||
| switch { | ||
| case errA != nil: | ||
| log.V(3).Error(errA, "Error fetching LocalQueue from informer") |
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.
Actually this code does not know this comes from informer. For example we could change the impl of LqUsage to use cache, but we wouldn't remember to change the log. I would suggest to have a local function which logs and call it.
something like:
lqUsageOrLogError := func(...) usage {
usage, err := a.LqUsage(ctx, c, fsResWeights)
if err != nil {
log.V(2).Error("Error determining LocalQueue usage", "localQueue", lq.Name)
}
return usage
}also, errors should probably not be V(3).
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'll fix the message and the depth of the log but the local functions seems like a little overkill to me. I need to have information about the error not only for logging but also to decide if I can compare usages
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.
Ah, got it, so in case of errors you don't compare them at all, sounds reasonable. Ideally, the functions used in comparators should not return errors at all.
For example, we could retrieve the LqUsage before calling comparators and just store in memory for quick access. We can leave it for a follow up.
|
@PBundyra: 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-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
|
LGTM label has been added. Git tree hash: 33fd40967855828f0da439e29de8d1485591560e
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mimowo, PBundyra 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 |
|
These are good comments, I guess the most important is to address the API remarks before the release, the other ones could probably be fixed as follow up issue(s). wdyt @tenzen-y ? |
|
@PBundyra please address the comments, I think the API updates have priority. |
|
Sure, will do in a follow-up |
I think API markers and validations for ConfigAPIs are higher priority. |
* Introduce FairSharing at admission time * Change shape of config API * Clean up * Address comments * Address comments * Generate helm charts * Add unit tests that check time left for another reconcile * Address nits * Adjust integration test to the new shape of API * Make FS status in LQ a pointer * Adjust wrapper * Rename API field to be consitent with CQ * Clean up comments, small logic fix * Add feature gate, reduce number of requeste in lq controller * Switch on feature gate before creating manager * Align examples with the latest naming changes * Ensure test is not flaky, small refactor * Small refactor, fix naming, improve logging, add another feature gate check * Fix feature gates in unit tests
What type of PR is this?
/kind feature
What this PR does / why we need it:
Changes described in the first phase of #4252
Which issue(s) this PR fixes:
Fixes #4136
Special notes for your reviewer:
I still need to comment some API fields and integration tests
Does this PR introduce a user-facing change?