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

fix: remove deprecated grpc.WithBlock #490

Merged

Conversation

salasberryfin
Copy link
Contributor

What this PR does / why we need it:

gRPC's WithBlock is deprecated and using it will prevent us from updating google.golang.org/grpc.

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 #488

Special notes for your reviewer:

We can create a specific context and pass it to clientv3.Config so it manages timeouts and cancellations. This will prevent operations from hanging indefinitely.

Checklist:

  • squashed commits into logical changes
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@salasberryfin salasberryfin added the kind/bug Something isn't working label Oct 31, 2024
@salasberryfin salasberryfin requested a review from a team as a code owner October 31, 2024 10:00
@salasberryfin salasberryfin added the area/dependency Issues or PRs related to dependency changes label Oct 31, 2024
@salasberryfin salasberryfin changed the title WIP: fix: remove deprecated grpc.WithBlock fix: remove deprecated grpc.WithBlock Nov 7, 2024
@furkatgofurov7
Copy link
Contributor

@salasberryfin can we rebase this PR? Otherwise this LGTM

@yiannistri
Copy link
Contributor

The change looks ok to me but I'm wondering if a linter suppression would be more appropriate at this point in time. Basically this comment seems to suggest that the WithBlock() behaviour can be substituted with additional code and I'm not sure whether the go.etcd.io/etcd/client/v3 v3.5.13 client that we use in CAPRKE2 right now will do the right thing or not. Perhaps we should consider upgrading the etcd client as well or perhaps I'm worrying about this too much 😕

Useful context: https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md

@furkatgofurov7 furkatgofurov7 merged commit efb87b8 into rancher:main Nov 11, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dependency Issues or PRs related to dependency changes kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gRPC WithBlock is deprecated
4 participants