-
Notifications
You must be signed in to change notification settings - Fork 40.7k
test: Add test case for createNodesOp #131607
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
test: Add test case for createNodesOp #131607
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
name: "Zero Nodes", | ||
nodeCount: 0, |
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.
Should this be an error in the validation? If so, I'll create the issue and fix it after merging this PR.
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.
Yeah, 0 on count doesn't make sense, which could be checked at a validation phase.
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've created the issue and will try it after merging this pr.
#131828
93c541b
to
c487678
Compare
/cc @macsko @sanposhiho |
c487678
to
35eceae
Compare
b63e59f
to
4f965bc
Compare
4f965bc
to
b30c176
Compare
/retest-required |
17fca56
to
00eb343
Compare
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.
nice, lookin' a lot better
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.
only nits
test/utils/runners.go
Outdated
if newNode.Status.Allocatable == nil { | ||
newNode.Status.Allocatable = make(v1.ResourceList) | ||
} |
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.
Why do we need this change?
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.
You're right to question this. In production, kubelet always initializes Allocatable
, but test nodes might not have it set.
Would you prefer if I add a comment explaining this, or should we enforce that test templates always include Allocatable
?
Without this nil check, the test TestRunOp/Create_Nodes_with_Node_Allocatable_Strategy
fails with:
panic: assignment to entry in nil map
at test/utils/runners.go:893 in NodeAllocatableStrategy.PreparePatch
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.
Could you try just initializing Allocatable
in makeBaseNode
?
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.
Sure. Updated.
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.
@macsko PTAL 🙏
/test pull-kubernetes-scheduler-perf |
7c89a7d
to
174d424
Compare
/test pull-kubernetes-scheduler-perf |
@macsko This PR has passed |
Signed-off-by: utam0k <[email protected]>
174d424
to
57d55fb
Compare
/test pull-kubernetes-scheduler-perf |
/approve Leaving final stamp to @sanposhiho |
@macsko Thanks for your review 🙏 |
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.
/lgtm
Lovely, thanks!
LGTM label has been added. Git tree hash: 3447806cc240e8d7d25034654dee8ef785634a38
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: macsko, sanposhiho, utam0k 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 cleanup
/sig scheduling
What this PR does / why we need it:
To enhance scheduler_perf testing
Which issue(s) this PR fixes:
A part of #127745
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: