Skip to content

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

Merged
yitsushi merged 5 commits intomainfrom
3812-refactor-deprecated-wait-poll
Oct 31, 2023
Merged

refactor: refactor away from deprecated wait.Poll calls#4107
yitsushi merged 5 commits intomainfrom
3812-refactor-deprecated-wait-poll

Conversation

@yitsushi
Copy link
Copy Markdown
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

@yitsushi yitsushi requested a review from yiannistri October 27, 2023 09:56
@yitsushi yitsushi force-pushed the 3812-refactor-deprecated-wait-poll branch from c4edf9d to 5c4820e Compare October 27, 2023 09:56
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 thread go.mod
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

❤️

Comment thread pkg/run/session/connect/connect.go Outdated
Co-authored-by: Yiannis Triantafyllopoulos <8741709+yiannistri@users.noreply.github.com>
@yitsushi yitsushi merged commit 4dff204 into main Oct 31, 2023
@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