Skip to content
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

Сlear RequeuAt on workload backoff finished #2143

Conversation

mbobrovskyi
Copy link
Contributor

@mbobrovskyi mbobrovskyi commented May 6, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

Clear RequeuAt on workload backoff finished.

Which issue(s) this PR fixes:

Fixes #2038

Special notes for your reviewer:

Does this PR introduce a user-facing change?

WaitForPodsReady: clear RequeueAt when the workload backoff time is completed.

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 6, 2024
@k8s-ci-robot k8s-ci-robot requested review from mimowo and trasc May 6, 2024 12:52
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 6, 2024
Copy link

netlify bot commented May 6, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 6cb404b
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/6638dc112551140008b31afc

@mbobrovskyi
Copy link
Contributor Author

/test all

@mimowo
Copy link
Contributor

mimowo commented May 6, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label May 6, 2024
@@ -2003,6 +2003,8 @@ var _ = ginkgo.Describe("Job controller interacting with scheduler when waitForP
g.Expect(createdJob.Status.Ready).ShouldNot(gomega.BeNil())
g.Expect(*createdJob.Status.Ready).Should(gomega.Equal(int32(1)))
g.Expect(k8sClient.Get(ctx, wlKey, wl)).Should(gomega.Succeed())
g.Expect(wl.Status.RequeueState).ShouldNot(gomega.BeNil())
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also verify that the count is not cleared

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Added.

@mbobrovskyi mbobrovskyi force-pushed the fix/clear-requeuat-on-workload-backoff-finished branch from 1ae124d to 30fa599 Compare May 6, 2024 13:02
@mbobrovskyi mbobrovskyi marked this pull request as ready for review May 6, 2024 13:02
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 6, 2024
@k8s-ci-robot k8s-ci-robot requested a review from kerthcet May 6, 2024 13:02
@mbobrovskyi
Copy link
Contributor Author

/assign @mimowo

@@ -2003,6 +2003,10 @@ var _ = ginkgo.Describe("Job controller interacting with scheduler when waitForP
g.Expect(createdJob.Status.Ready).ShouldNot(gomega.BeNil())
g.Expect(*createdJob.Status.Ready).Should(gomega.Equal(int32(1)))
g.Expect(k8sClient.Get(ctx, wlKey, wl)).Should(gomega.Succeed())
g.Expect(wl.Status.RequeueState).ShouldNot(gomega.BeNil())
g.Expect(wl.Status.RequeueState.Count).ShouldNot(gomega.BeNil())
g.Expect(*wl.Status.RequeueState.Count, 0).Should(gomega.Equal(int32(1)))
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
g.Expect(*wl.Status.RequeueState.Count, 0).Should(gomega.Equal(int32(1)))
g.Expect(wl.Status.RequeueState.Count).Should(gomega.Equal(ptr.To[int32](1)))

Would it work? I guess it will give us a nicer error message that if we panic with nil panic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, because I check that wl.Status.RequeueState.Count shouldn't be nil on previous line.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I see, but can we collapse these two lines into one, as in the comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@mbobrovskyi mbobrovskyi force-pushed the fix/clear-requeuat-on-workload-backoff-finished branch from 30fa599 to 6cb404b Compare May 6, 2024 13:33
@mimowo
Copy link
Contributor

mimowo commented May 6, 2024

/lgtm
/approve
Thanks!

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

LGTM label has been added.

Git tree hash: cfb9107e0497cd92eccde7f51f9bb9b802091295

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mbobrovskyi, mimowo

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 6, 2024
@k8s-ci-robot k8s-ci-robot merged commit fcde429 into kubernetes-sigs:main May 6, 2024
15 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.7 milestone May 6, 2024
@mbobrovskyi mbobrovskyi deleted the fix/clear-requeuat-on-workload-backoff-finished branch May 6, 2024 14:08
@alculquicondor
Copy link
Contributor

/release-note-edit

WaitForPodsReady: clear RequeueAt when the workload backoff time is completed.

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/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix transitions of Requeued condition
4 participants