-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Refactor Code to Use PollUntilContextTimeout
Replacing Deprecated PolImmediate
#122708
Conversation
Hi @daniel-hutao. Thanks for your PR. I'm waiting for a kubernetes 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. |
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.
please remove the cmd/kubeadm changes from this PR as we have them pending in another PR
#122529
thanks.
/remove-sig cluster-lifecycle |
@neolit123 Ok, I'll remove it in the next commit. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: daniel-hutao The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
/triage accepted |
Thanks for this PR. IMO this is a pretty large PR as is and its going to be difficult to find reviewers/approvers for this. You could make it easier on yourself by maybe separating these PRs by sigs. |
@daniel-hutao: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
@daniel-hutao these failures are related to your PR. Could you look into fixing these? I brought your PR up in slack in #k8s-code-organization as this has come up before. https://kubernetes.slack.com/archives/CHGFYJVAN/p1705335454294119 I'd like to maybe have test code separated from actual prod code at a minimum. /cc @pohly |
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 stated earlier, I think the PR is a valid addition but I think we should aim to break this PR up.
Ideally I'd like the test code separated into its own PR and the production code into a different PR (and ideally that should be small and separated by sigs so we can get more detailed reviews).
@@ -17,6 +17,7 @@ limitations under the License. | |||
package manager |
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.
For Kubelet, this is a non test related change. It would be nice to be a bit more careful on these.
} | ||
return false, nil | ||
}); err != nil { | ||
if err = wait.PollUntilContextTimeout(context.Background(), retrySleepTime, retrySleepTime*scheduler.NodeHealthUpdateRetry, true, |
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.
Another non test related change.
conn.Close() | ||
return true, nil | ||
}) | ||
err = wait.PollUntilContextTimeout(context.Background(), 1*time.Second, 10*time.Second, true, |
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.
non test related change that seems to be part of some api changes. Be careful on these also.
@kannon92 Thank for your review and advice. I agree with your idea and prepare to separate this PR to some small PRs. I'll open an issue to trigger these PRs. |
/close I prefer to close this PR first. The separate PRs are triggering in #122800. |
@daniel-hutao: Closed this PR. In response to this:
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. |
Looking forward to your feedback to continue with the rest of the updates.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Refactor code to use
PollUntilContextTimeout
replacing deprecatedPolImmediate
.Which issue(s) this PR fixes:
N/A
Special notes for your reviewer:
Completely updating all the deprecated
PollImmediate
toPollUntilContextTimeout
is a big task. It took me quite a while, and I have changed about half of them.However, I have noticed that the number of files modified in the current update is already quite substantial. If I were to continue with this update task, it might require modifying dozens more files, which could pose some difficulties for the review process.
Therefore, I have decided to submit a PR now. The remaining update work can be completed in a separate PR later on.
Does this PR introduce a user-facing change?