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

refactor: refactor away from deprecated wait.Poll calls #4107

Merged
merged 5 commits into from
Oct 31, 2023

Conversation

yitsushi
Copy link
Contributor

@yitsushi yitsushi commented Oct 27, 2023

Closes #3812

What changed?
wait.Poll is replaced with wait.PollUntilContextTimeout calls.

Why was this change made?
wait.Poll is deprecated

How was this change implemented?

With the update, some other calls had to be updated:

  • NewDiscoveryRESTMapper expects an extra HTTPClient argument
  • client does not have NewDelegatingClient anymore, instead we can create the same resource with client.New(...)

References:

How did you validate the change?
Run tests and clicked a reasonable number of pages on the UI through tilt

Release notes

Documentation Changes
Nothing

With the update, some other calls had to be updated:
- `NewDiscoveryRESTMapper` expects an extra `HTTPClient` argument
- `client` does not have `NewDelegatingClient` anymore, instead we can
  create the same resource with `client.New(...)`

Resolves #3812

References:
- #3812
- kubernetes-sigs/controller-runtime#2150
- https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.15.0

Signed-off-by: Balazs Nadasdi <balazs@weave.works>
@yitsushi yitsushi force-pushed the 3812-refactor-deprecated-wait-poll branch from 5c4820e to dd73b50 Compare October 27, 2023 09:57
Comment on lines -234 to -244

// Replace k8s.io packages v0.26 to downgrade controller-runtime to v0.14.6
replace (
k8s.io/api => k8s.io/api v0.26.8
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.26.8
k8s.io/apimachinery => k8s.io/apimachinery v0.26.8
k8s.io/cli-runtime => k8s.io/cli-runtime v0.26.8
k8s.io/client-go => k8s.io/client-go v0.26.8

sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.14.6
)
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

pkg/run/session/connect/connect.go Outdated Show resolved Hide resolved
Co-authored-by: Yiannis Triantafyllopoulos <8741709+yiannistri@users.noreply.github.com>
@yitsushi yitsushi merged commit 4dff204 into main Oct 31, 2023
27 checks passed
@yitsushi yitsushi deleted the 3812-refactor-deprecated-wait-poll branch October 31, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor away from wait.Poll calls
2 participants