-
Notifications
You must be signed in to change notification settings - Fork 4.2k
test: add unit tests for core/utils and improve nil-safety in helpers #8406
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
base: master
Are you sure you want to change the base?
Conversation
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kincoy 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 |
Hi @kincoy. Thanks for your PR. I'm waiting for a kubernetes 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. |
@feiskyer @vadasambar Hi, could you please re-run the failed workflows? They appear to be unrelated to this PR. Thanks🙏! |
@kincoy sorry I don't have permissions to restart the failed workflow. Can you try creating an empty commit like this to trigger the build (another option is to create a small harmless change like adding new line and removing it later):
|
210db02
to
b585c82
Compare
Thanks for your feedback. I found a minor issue in my changes, which has now been fixed. I’ve pushed the update and all tests have passed. Please help review the latest commit to see if it looks good. Thanks again!🙏。 |
Signed-off-by: kincoy <[email protected]>
b585c82
to
a21eb0e
Compare
/ok-to-test |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR improves unit test coverage for several utility functions in
core/utils
, helping ensure correctness and robustness of logic that supports autoscaling decisions.Specifically:
FilterOutNodesFromNotAutoscaledGroups
GetOldestCreateTimeWithGpu
hasHardInterPodAffinity
isVirtualNode
isVirtualNode
when passed anil
nodecore/utils/utils.go
from 47.4% to 84.6%before:

after:

Which issue(s) this PR fixes:
N/A — test coverage improvement
Special notes for your reviewer:
isVirtualNode
Does this PR introduce a user-facing change?