asyncpoller fails when SDK PollUntilDone
returns a Done poller
#3970
Labels
kind/bug
Categorizes issue or PR as related to a bug.
priority/important-soon
Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone
/kind bug
What steps did you take and what happened:
This AKS test run failed to delete an AzureManagedMachinePool: https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-azure/3932/pull-cluster-api-provider-azure-e2e-aks/1699797265842966528
The following appears in the logs several times:
Other runs:
What did you expect to happen:
Anything else you would like to add:
It looks like the call to
DeleteAsync
in asyncpoller.go is returning a non-nil poller wherepoller.Done() == true
. There are a few things I noticed that might help in coming up with a fix, but it's not obvious to me the best route to take:err
returned by the call toDeleteAsync
in asyncpoller.go is not checked whenpoller != nil
.poller
returned in the same call is not checked if it's.Done()
before ultimately it's.ResumeToken()
method is called, which fails when the poller is done. This directly correlates to the above error message form the CAPZ logs..Result()
?The same issue likely affects the CreateOrUpdate flow as well.
Environment:
kubectl version
):/etc/os-release
):fyi @mboersma
The text was updated successfully, but these errors were encountered: