Skip to content

Conversation

@tenzen-y
Copy link
Member

@tenzen-y tenzen-y commented Nov 27, 2025

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.timeout a required field.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

v1beta2: Make .waitForPodsReady.timeout required field in the Config API

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Nov 27, 2025
@netlify
Copy link

netlify bot commented Nov 27, 2025

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 1ecafc8
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-kueue/deploys/69285c5ab38227000857cbe1

@k8s-ci-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 27, 2025
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
}

func Convert_v1beta1_WaitForPodsReady_To_v1beta2_WaitForPodsReady(in *WaitForPodsReady, out *v1beta2.WaitForPodsReady, s conversionapi.Scope) error {
if in != nil && in.Enable && in.Timeout == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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?

Copy link
Member Author

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?

Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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.

Copy link
Member Author

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?

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Member Author

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>
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 27, 2025
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@mimowo
Copy link
Contributor

mimowo commented Nov 27, 2025

/lgtm
Thank you 👍

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 27, 2025
@k8s-ci-robot
Copy link
Contributor

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 {
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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!

@mimowo
Copy link
Contributor

mimowo commented Nov 27, 2025

https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/kubernetes-sigs_kueue/7952/pull-kueue-test-e2e-customconfigs-main/1994031239329222656
looks like flake, but not sure, let's retry:
/test pull-kueue-test-e2e-customconfigs-main

@mimowo
Copy link
Contributor

mimowo commented Nov 27, 2025

WaitForPodsReady with default Timeout and a tiny RecoveryTimeout [BeforeAll] should evict and requeue workload when pod failure causes recovery timeout
  [BeforeAll] /home/prow/go/src/sigs.k8s.io/kueue/test/e2e/customconfigs/waitforpodsready_test.go:217
  [It] /home/prow/go/src/sigs.k8s.io/kueue/test/e2e/customconfigs/waitforpodsready_test.go:288
  [FAILED] Timed out after 300.001s.
  The function passed to Eventually failed at /home/prow/go/src/sigs.k8s.io/kueue/test/util/e2e.go:239 with:
  Expected
      <string>: ReplicaSetUpdated
  to equal
      <string>: NewReplicaSetAvailable
  In [BeforeAll] at: /home/prow/go/src/sigs.k8s.io/kueue/test/util/e2e.go:530 @ 11/27/25 13:53:17.463

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>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 27, 2025
@k8s-ci-robot k8s-ci-robot requested a review from mimowo November 27, 2025 14:12

util.UpdateKueueConfiguration(ctx, k8sClient, defaultKueueCfg, kindClusterName, func(cfg *configapi.Configuration) {
cfg.WaitForPodsReady = &configapi.WaitForPodsReady{
Timeout: metav1.Duration{Duration: 5 * time.Minute},
Copy link
Member Author

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},
Copy link
Member Author

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.

Copy link
Contributor

@mimowo mimowo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 27, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: d1162f35f619c57138b97d2246b495931fdd341d

@k8s-ci-robot k8s-ci-robot merged commit f28acf1 into kubernetes-sigs:main Nov 27, 2025
29 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.15 milestone Nov 27, 2025
@tenzen-y tenzen-y deleted the make-required-field-wait-for-pods-ready branch November 27, 2025 15:19
@tenzen-y
Copy link
Member Author

/remove-kind cleanup
/kind api-change

@k8s-ci-robot k8s-ci-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API and removed kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants