Skip to content
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

Update k8s deps #441

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Conversation

manuelbuil
Copy link
Collaborator

@manuelbuil manuelbuil commented Mar 15, 2024

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

  • k8s.io/api
  • k8s.io/apimachinery
  • k8s.io/client-go
  • k8s.io/code-generator
  • k8s.io/kube-openapi
  • sigs.k8s.io/controller-tools/cmd/controller-gen (not necessary but I saw that we were using a pretty old version)

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):

@manuelbuil manuelbuil force-pushed the updateK8sdeps branch 14 times, most recently from 20176c4 to e44bcd1 Compare March 15, 2024 18:30
@coveralls
Copy link

coveralls commented Mar 15, 2024

Pull Request Test Coverage Report for Build 8326126665

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 72.357%

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

💛 - Coveralls

Signed-off-by: Manuel Buil <mbuil@suse.com>
Copy link
Member

@dougbtv dougbtv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the refactor for context changes. LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants