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

v0.27.1 of apimachinery package introduces new linter failures #243

Closed
harshanarayana opened this issue Apr 17, 2023 · 0 comments · Fixed by #244
Closed

v0.27.1 of apimachinery package introduces new linter failures #243

harshanarayana opened this issue Apr 17, 2023 · 0 comments · Fixed by #244

Comments

@harshanarayana
Copy link
Contributor

harshanarayana commented Apr 17, 2023

When Dependabot upgraded the dependencies for v0.27.1 of apimachinary it introduces a set of new lint failures that are caused by the deprecated wait helper functions.

klient/internal/testutil/setup.go:98:8: SA1019: wait.Poll is deprecated: This method does not return errors from context, use PollWithContextTimeout. 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. (staticcheck)
	err = wait.Poll(5*time.Second, time.Minute*2,
	      ^
klient/internal/testutil/setup.go:129:8: SA1019: wait.Poll is deprecated: This method does not return errors from context, use PollWithContextTimeout. 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. (staticcheck)
	err = wait.Poll(5*time.Second, time.Minute*2,
	      ^
klient/wait/wait.go:102:11: SA1019: apimachinerywait.PollImmediateUntil is deprecated: This method does not return errors from context, use PollWithContextCancel. 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. (staticcheck)
			return apimachinerywait.PollImmediateUntil(options.Interval, conditionFunc, options.StopChan)
			       ^
klient/wait/wait.go:104:10: SA1019: apimachinerywait.PollUntil is deprecated: This method does not return errors from context, use PollWithContextCancel. 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. (staticcheck)
		return apimachinerywait.PollUntil(options.Interval, conditionFunc, options.StopChan)
		       ^
klient/wait/wait.go:108:10: SA1019: apimachinerywait.PollImmediate is deprecated: This method does not return errors from context, use PollWithContextTimeout. 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. (staticcheck)
		return apimachinerywait.PollImmediate(options.Interval, options.Timeout, conditionFunc)
		       ^
klient/wait/wait.go:110:9: SA1019: apimachinerywait.Poll is deprecated: This method does not return errors from context, use PollWithContextTimeout. 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. (staticcheck)
	return apimachinerywait.Poll(options.Interval, options.Timeout, conditionFunc)
	       ^
make: *** [verify-golangci-lint] Error 1

This needs manual changes to be performed before merging.

  1. Bump k8s.io/apimachinery from 0.26.3 to 0.27.1 #242
@harshanarayana harshanarayana changed the title v0.27.1 of apimachinary package introduces new linter failures v0.27.1 of apimachinery package introduces new linter failures Apr 17, 2023
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 a pull request may close this issue.

1 participant