-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 MinReadySeconds for machinepools #9837
🌱 MinReadySeconds for machinepools #9837
Conversation
Hi @Dhairya-Arora01. 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/test-infra repository. |
/ok-to-test |
/retest |
7390f48
to
ca9ea62
Compare
sgtm from my side, but it would be great if @CecileRobertMichon or @Jont828 or someone from the team could take a look |
/assign @willie-yao Willie could you take a pass at a review? |
@@ -181,7 +182,7 @@ func TestMachinePoolGetNodeReference(t *testing.T) { | |||
t.Run(test.name, func(t *testing.T) { | |||
g := NewWithT(t) | |||
|
|||
result, err := r.getNodeReferences(ctx, client, test.providerIDList) | |||
result, err := r.getNodeReferences(ctx, client, test.providerIDList, ptr.To[int32](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.
I think it would help to add a unit test case that tests the change in behavior for available
. It doesn't seem like any of the existing test cases check for available
besides the empty case.
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 otherwise!
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
@Dhairya-Arora01 Do you have time to adress the open finding? |
ca9ea62
to
25098ff
Compare
@sbueringer , sorry can you take a look now.... |
exp/internal/controllers/machinepool_controller_noderef_test.go
Outdated
Show resolved
Hide resolved
exp/internal/controllers/machinepool_controller_noderef_test.go
Outdated
Show resolved
Hide resolved
@Dhairya-Arora01 do you have time to address the findings above? |
2626f0a
to
96050dc
Compare
96050dc
to
e59290f
Compare
e59290f
to
089e073
Compare
name: "valid provider id, valid aws node, with minReadySeconds equals 0", | ||
providerIDList: []string{"aws://us-east-1/id-node-1"}, | ||
expected: &getNodeReferencesResult{ | ||
references: []corev1.ObjectReference{{Name: "node-1"}}, |
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.
As mentioned in a previous comment. Let's start validating expected.available/ready against result (somewhere ~ in l.219)
Today this test never validates the available and ready fields.
In fact. At the moment they are always 0 because we never set conditions correctly to get ready or available Nodes. Let's change that as well.
(otherwise we don't have any test coverage for ready/available)
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 wasn't able to follow the force-pushes but I see that the test is now validating available and ready fields based on a different minReadySeconds. That looks good!!
I think the only thing missing is a test case when the NodeReady condition is false, both ready and available should be 0.
55e9be6
to
d0f12a1
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.
/lgtm
LGTM label has been added. Git tree hash: e08b06f1bff4400ba84e85e15107094bfcf1e97f
|
/lgtm |
Thx! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer 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 this PR does / why we need it: Making MinReadySeconds work in machinepools
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #8952
/area machinepool