kubectl
kubectl copied to clipboard
Drain Package Functions Should Use PollUntilContextTimeout and Return Properly Typed Errors
Drain package function waitForDelete uses wait.PollImmediate. That function is deprecated and instead PollUntilContextTimeout should be used. In addition, we cannot check the returned error from waitForDelete function with wait.Interrupted because the function returns an error with fmt.Errorf.
What would you like to be added: Instead of using wait.PollImmediate, we should switch to PollUntilContextTimeout . Also, the waitForDelete should return an error of type ErrorInterrupted.
Why is this needed: wait.PollImmediate is deprecated. The current returned error is hard to check and requires string comparison.
I am happy to work on this, if this change sounds reasonable.
/triage accepted We would accept a PR for this, thank you for offering to help with this @ugrkm
/assign
This issue has not been updated in over 1 year, and should be re-triaged.
You can:
- Confirm that this issue is still relevant with
/triage accepted(org members only) - Close this issue with
/close
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-triage accepted