-
Notifications
You must be signed in to change notification settings - Fork 251
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
Support Cohorts with Resources in cache/hierarchy packages #2939
Support Cohorts with Resources in cache/hierarchy packages #2939
Conversation
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
/assign @macsko |
0924890
to
e4dcb28
Compare
wantCohorts: sets.New("cohort"), | ||
wantCqs: sets.New("queue"), | ||
wantCqEdge: []cqEdge{{"queue", "cohort"}}, | ||
}, |
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.
What about testing the cleanupCohort
method? Like:
m.AddCohort(newCohort("cohort"))
m.AddClusterQueue(newCq("queue"))
m.UpdateClusterQueueEdge("queue", "cohort")
m.DeleteCohort("cohort")
m.DeleteClusterQueue("queue")
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.
added
pkg/hierarchy/manager.go
Outdated
} | ||
|
||
// rewireChildren is used when we are changing a Cohort | ||
// from an implicit to an explcit Cohort, or vice-versa. |
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.
nit: explcit -> explicit
pkg/cache/cache.go
Outdated
defer c.Unlock() | ||
c.hm.DeleteCohort(apiCohort.Name) | ||
|
||
// if the cohort still exists after deletion, it means |
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.
nit: start with upper case
e4dcb28
to
bcdebab
Compare
/lgtm |
LGTM label has been added. Git tree hash: 5c6066569fcfec1b165141c8c4c496c8ae093556
|
@@ -57,6 +57,9 @@ issues: | |||
- staticcheck | |||
# TODO(#768): Drop when incrementing the API version. | |||
text: "SA1019: constants.QueueAnnotation is deprecated" | |||
- linters: |
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.
tracking here: #2965
/assign @mimowo |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gabesaba, mimowo 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 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Update cache to support Cohorts with resources. Update hierarchy to support explicit Cohorts. Part of #79
Special notes for your reviewer:
commit 1 : move files and refactor parsing
commit 2: support Cohorts which provide resources in
cache
. support explicit Cohorts inhierarchy
Users cannot use this functionality until we wire up reconciler and webhook. In the interest of keeping PRs small, I will publish those in separate PRs.
Does this PR introduce a user-facing change?