-
Notifications
You must be signed in to change notification settings - Fork 348
Add support for node selectors based filtering in TAS #4989
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
Add support for node selectors based filtering in TAS #4989
Conversation
Hi @mwysokin. 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-sigs/prow repository. |
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
/ok-to-test |
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 a quick pass, leaving more detailed review to @mbobrovskyi
Co-authored-by: Mykhailo Bobrovskyi <[email protected]>
Co-authored-by: Mykhailo Bobrovskyi <[email protected]>
… selectors Co-authored-by: Patryk Bundyra <[email protected]>
Co-authored-by: Patryk Bundyra <[email protected]>
}) | ||
}) | ||
|
||
ginkgo.It("should admit workload when node label value is corrected", 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.
Handling node mutations is outside the scope of this PR, and it works because of some prior work.
I think it is safe to test on a static set of nodes under "Nodes are created before test with rack being the lowest level". We could simply add a label to one of the nodes and confirm the workload picks the node.
If you think there is some value in the mutating tests, I would just keep one of the two.
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.
My rationale was: let's have 2 tests:
- one will check whether if a correct labels appears everything will work,
- the other one will check whether not only the key was correct but also the value, so the key match should initially work but the values wouldn't match and the node wouldn't be selected but once the correct value is set the node would match. I guess this could be merged into a single test. I'd like to be sure that we have a proof of not matching based on the single item of key, value pair.
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 merged 2 tests into one. I think it's beneficial to show that kueue reacts to events of the nodes. Using static integration tests would be simpler but since we already have the dynamic version I would use it since it covers a wider area already.
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.
so the key match should initially work but the values wouldn't match and the node wouldn't be selected but once the correct value is set the node would match
I buy the rationale, by checking util.ExpectPendingWorkloadsMetric(clusterQueue, 0, 1)
you confirm that Scheduler already processed the workload and classified as "inadmissible" without the label.
I merged 2 tests into one.
Thanks.
non-blocking (let me know what you think): I propose to drop setting the label to a wrong value (this block). The wrong label case we already cover at the unit test level in "skip node which doesn't match node selector, label exists, value doesn't match; BestFit".
Awesome! /cherry-pick release-0.11 |
@mimowo: once the present PR merges, I will cherry-pick it on top of 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-sigs/prow repository. |
LGTM label has been added. Git tree hash: 9aaa95dbbd38e6673efd367f4009815db0ed7c5f
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mimowo, mwysokin 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 |
/lgtm |
/unhold |
/test pull-kueue-test-scheduling-perf-main |
@mimowo: #4989 failed to apply on top of branch "release-0.11":
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-sigs/prow repository. |
@mwysokin please prepare the cherry-pick manually using |
…filtering in TAS (#5079) * Implement TAS using node selectors during node filtering * REVIEW: Change logging in TAS filtering node logic back to level 2 * REVIEW: remove superfluous Set constructions Co-authored-by: Mykhailo Bobrovskyi <[email protected]> * REVIEW: remove superfluous Set construction Co-authored-by: Mykhailo Bobrovskyi <[email protected]> * REVIEW: remove overly verbose handling of case when there are no node selectors Co-authored-by: Patryk Bundyra <[email protected]> * Apply node selection logic only for the lowest level of topology * REVIEW: add error handling for invalid node selectors * Fix lint * REVIEW: simplify test label value Co-authored-by: Patryk Bundyra <[email protected]> * REVIEW: Extract compilation of the node selector outside of the fillInCounts functions * REVIEW: Merge 2 integration tests into 1 --------- Co-authored-by: Mykhailo Bobrovskyi <[email protected]> Co-authored-by: Patryk Bundyra <[email protected]>
…filtering in TAS (#5087) * Implement TAS using node selectors during node filtering * REVIEW: Change logging in TAS filtering node logic back to level 2 * REVIEW: remove superfluous Set constructions Co-authored-by: Mykhailo Bobrovskyi <[email protected]> * REVIEW: remove superfluous Set construction Co-authored-by: Mykhailo Bobrovskyi <[email protected]> * REVIEW: remove overly verbose handling of case when there are no node selectors Co-authored-by: Patryk Bundyra <[email protected]> * Apply node selection logic only for the lowest level of topology * REVIEW: add error handling for invalid node selectors * Fix lint * REVIEW: simplify test label value Co-authored-by: Patryk Bundyra <[email protected]> * REVIEW: Extract compilation of the node selector outside of the fillInCounts functions * REVIEW: Merge 2 integration tests into 1 --------- Co-authored-by: Mykhailo Bobrovskyi <[email protected]> Co-authored-by: Patryk Bundyra <[email protected]>
/release-note-edit
|
/release-note-edit
|
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR adds support for node selectors in TAS.
Which issue(s) this PR fixes:
Fixes #4571
Special notes for your reviewer:
The PR has the following changes:
ExpectClusterQueuesToBeActive
for test suiteNode is mutated during test cases
which seemed to be missing compare to the other suites.Does this PR introduce a user-facing change?