-
Notifications
You must be signed in to change notification settings - Fork 507
Make waitForPodsReady.timeout required field #7952
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
Make waitForPodsReady.timeout required field #7952
Conversation
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tenzen-y The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| } | ||
|
|
||
| func Convert_v1beta1_WaitForPodsReady_To_v1beta2_WaitForPodsReady(in *WaitForPodsReady, out *v1beta2.WaitForPodsReady, s conversionapi.Scope) error { | ||
| if in != nil && in.Enable && in.Timeout == nil { |
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.
| if in != nil && in.Enable && in.Timeout == nil { | |
| if in.Enable && in.Timeout == nil { |
I'm wondering do we need to check for nil here. IIUC it shouldn't execute this function if we have nil, right?
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'm not sure. Do you know if it has never been called in case of in is nil?
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, checking in != nil feels safer
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, we have this test case https://github.com/tenzen-y/kueue/blob/11c6f37a2bbf28eb0741709cca64b2c2b8b6fa3e/apis/config/v1beta1/configuration_conversion_test.go#L34-L37. If you remove this check nothing happens.
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.
OK, let me check that in this branch.
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 verified that in != nil can be removed.
@mimowo Do you think that we shold keep in != nil?
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.
no, let's drop in that 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.
no, let's drop in that 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.
awesome, I dropped.
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: 14ccbcdf387f6b9bcbd6b658cbd1f76a2f09f904 |
| } | ||
|
|
||
| func Convert_v1beta1_WaitForPodsReady_To_v1beta2_WaitForPodsReady(in *WaitForPodsReady, out *v1beta2.WaitForPodsReady, s conversionapi.Scope) error { | ||
| if in.Enable && in.Timeout == nil { |
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.
Shouldn't we convert to pointer in Convert_v1beta2_WaitForPodsReady_To_v1beta1_WaitForPodsReady?
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.
NVM I tested it manually. It is automatically convert it.
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.
@mbobrovskyi I think this can automatically convert pointer <-> non-pointer.
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.
Thank you for double check!
|
https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/kubernetes-sigs_kueue/7952/pull-kueue-test-e2e-customconfigs-main/1994031239329222656 |
I can see that again already in the ongoing build, so likely not just a flake |
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
|
|
||
| util.UpdateKueueConfiguration(ctx, k8sClient, defaultKueueCfg, kindClusterName, func(cfg *configapi.Configuration) { | ||
| cfg.WaitForPodsReady = &configapi.WaitForPodsReady{ | ||
| Timeout: metav1.Duration{Duration: 5 * time.Minute}, |
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.
This is a root cause.
We added a validation to reject an empty timeout, but my previous commit does not specify this one.
So, the kueue-controller-manager failed to start itself due to validation.
|
|
||
| util.UpdateKueueConfiguration(ctx, k8sClient, defaultKueueCfg, kindClusterName, func(cfg *configapi.Configuration) { | ||
| cfg.WaitForPodsReady = &configapi.WaitForPodsReady{ | ||
| Timeout: metav1.Duration{Duration: 5 * time.Minute}, |
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.
This is the same reason as the above.
mimowo
left a comment
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. DetailsGit tree hash: d1162f35f619c57138b97d2246b495931fdd341d |
|
/remove-kind cleanup |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
As we discussed in #7767 (comment), we decided to make
waitForPodsReady.timeouta required field.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?