-
Notifications
You must be signed in to change notification settings - Fork 276
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
Refactor: split out flavor assigment logic #454
Refactor: split out flavor assigment logic #454
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor 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 |
/assign @ahg-g |
/cc |
2bdacc9
to
7caa84f
Compare
// ClusterQueuePreempt means that there is not enough min quota in the | ||
// ClusterQueue, so we need to preempt other workloads in the ClusterQueue | ||
// with lower priority. | ||
ClusterQueuePreempt |
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.
lets add those later in the PR that uses them.
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 left CohortFit for now.
"sigs.k8s.io/kueue/pkg/workload" | ||
) | ||
|
||
func TestAssignFlavors(t *testing.T) { |
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.
are the tests in this file mostly a copy?
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.
yes, they were moved from scheduler_test.go
Change-Id: I3cd13127c2fc92be836becffcd8a7e69d2c3a819
7caa84f
to
478dda8
Compare
/lgtm |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Split the logic for flavor assignment into its own package.
This decoupling can lead to better unit testing and more maintainable extensions in each of the packages.
I also added an "assignment mode" into the flavor assignment, which opens the possibility to assign flavors that require preemption.
Which issue(s) this PR fixes:
Preparation for #83
Special notes for your reviewer:
The integration tests didn't require any changes :D