k8snetworkplumbingwg / whereabouts

A CNI IPAM plugin that assigns IP addresses cluster-wide
Apache License 2.0
273 stars 120 forks source link

Update k8s deps #441

Closed manuelbuil closed 2 months ago

manuelbuil commented 3 months ago

What this PR does / why we need it: We need to update:

but those updates fail because we are using deprecated functions:

Error: e2e/client/ippool.go:37:9: wait.PollImmediate is deprecated: This method does not return errors from context, use PollUntilContextTimeout. Note that the new method will no longer return ErrWaitTimeout and instead return errors defined by the context package. Will be removed in a future release.  (SA1019)
Error: e2e/client/pod.go:19:9: wait.PollImmediate is deprecated: This method does not return errors from context, use PollUntilContextTimeout. Note that the new method will no longer return ErrWaitTimeout and instead return errors defined by the context package. Will be removed in a future release.  (SA1019)
Error: e2e/client/pod.go:25:9: wait.PollImmediate is deprecated: This method does not return errors from context, use PollUntilContextTimeout. Note that the new method will no longer return ErrWaitTimeout and instead return errors defined by the context package. Will be removed in a future release.  (SA1019)
Error: e2e/client/replicaset.go:19:9: wait.PollImmediate is deprecated: This method does not return errors from context, use PollUntilContextTimeout. Note that the new method will no longer return ErrWaitTimeout and instead return errors defined by the context package. Will be removed in a future release.  (SA1019)
Error: e2e/client/replicaset.go:25:9: wait.PollImmediate is deprecated: This method does not return errors from context, use PollUntilContextTimeout. Note that the new method will no longer return ErrWaitTimeout and instead return errors defined by the context package. Will be removed in a future release.  (SA1019)
Error: e2e/client/statefulset.go:18:9: wait.PollImmediate is deprecated: This method does not return errors from context, use PollUntilContextTimeout. Note that the new method will no longer return ErrWaitTimeout and instead return errors defined by the context package. Will be removed in a future release.  (SA1019)
Error: e2e/client/statefulset.go:50:9: wait.PollImmediate is deprecated: This method does not return errors from context, use PollUntilContextTimeout. Note that the new method will no longer return ErrWaitTimeout and instead return errors defined by the context package. Will be removed in a future release.  (SA1019)

This PR replaces those deprecated functions with the recommended one: PollUntilContextTimeout and does the update on those k8s dependencies

Apart from that, given the k8s.io/code-generator update, which is required if we update the rest, we must add the line:

chmod +x vendor/k8s.io/code-generator/generate-internal-groups.sh

in the Generate code step of the workflow test. The problem is that we are using a deprecated script, we should move to kube_codegen.sh. As the warning says:

WARNING: generate-groups.sh is deprecated.
WARNING: Please use k8s.io/code-generator/kube_codegen.sh instead. 

I can try to do that in another PR (I think this one is big enough)

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #

Special notes for your reviewer (optional):

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 8326126665

Details


Totals Coverage Status
Change from base Build 8282575075: 0.0%
Covered Lines: 1136
Relevant Lines: 1570

💛 - Coveralls