-
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
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel immediately executes condition twice #119533
Labels
kind/bug
Categorizes issue or PR as related to a bug.
sig/api-machinery
Categorizes an issue or PR as relevant to SIG API Machinery.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Comments
k8s-ci-robot
added
needs-sig
Indicates an issue or PR lacks a `sig/foo` label and requires one.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
labels
Jul 24, 2023
/sig api-machinery |
k8s-ci-robot
added
sig/api-machinery
Categorizes an issue or PR as relevant to SIG API Machinery.
and removed
needs-sig
Indicates an issue or PR lacks a `sig/foo` label and requires one.
labels
Jul 24, 2023
CC @smarterclayton @aojea since you were involved in #118671 #118686 #107826 |
/assign @aojea |
k8s-ci-robot
added
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
and removed
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
labels
Jul 25, 2023
I'd like to work on this one if it's allowed @aojea @smarterclayton
i.e.: instead of only wait a loop if immediate is false, we wait a time loop after special execution also if the immediate is true.
|
/assign |
/assign @AxeZhan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/bug
Categorizes issue or PR as related to a bug.
sig/api-machinery
Categorizes an issue or PR as relevant to SIG API Machinery.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
What happened?
While trying to update https://github.com/flatcar/flatcar-linux-update-operator/blob/7a1b0ff2769af91e8ff2bae82fc93f2f5baf0b0c/pkg/agent/agent.go#L328 to use latest version of
wait
package and to migrate away from deprecatedPollImmediateUntil
, function, our tests fail as it seems newPollUntilContextCancel
function immediately executes given condition twice, which is not mentioned anywhere.Result of executed test specified below:
What did you expect to happen?
Since
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntil
has been deprecated and it recommends usingk8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
, I expected it to have the equivalent semantics to allow easy migration from deprecated functions, as no changelog or documentation mentions new semantics.How can we reproduce it (as minimally and precisely as possible)?
Playground: https://go.dev/play/p/qQBnWM4nufF
Local:
go mod init foo && go get k8s.io/apimachinery/pkg/util/wait
main_test.go
file with the following content:go test . -v
.Anything else we need to know?
No response
Kubernetes version
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: