-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Migrate from grpc.Dial to grpc.NewClient #5330
Comments
working on it |
It looks like this requires replacing There are two problems encountered during the replacement process:
jaeger/cmd/agent/app/configmanager/grpc/manager_test.go Lines 50 to 59 in 8a4748c
|
Can you find docs, tickets, or changelog that explains why they replaced Dial with NewClient and what migration path is suggested? |
I have searched for the relevant documents as far as I can.
Unfortunately, I didn't find any information about the migration path, and other
|
The existing docs do say that WithTimeout should not be used, so it's safe to refactor to use NewClient and drop the timeouts handling during that phase. To your second question about the error string, my preference for testing errors like that is to wrap them in the business logic, e.g. |
The current
CI has been passed. But |
May be worth splitting your pr into pieces that are known to work ( verify via go test on individual packages) |
I can change the parts that don't affect the test first, and I'll mark |
…v1.64 (#5336) ## Which problem is this PR solving? - Related #5330 ## Description of the changes - Partial replace deprecated function in `grpc-go@v1.64` - `grpc.Dial` => `grpc.NewClient` - `grpc.DialContext` => `grpc.NewClient` - FYI: #5330 (comment) - Refactor configmanager GetSamplingStrategy business logic - Fixed related test ## How was this change tested? - make lint - make test - Try & Error ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
…v1.64 (jaegertracing#5336) ## Which problem is this PR solving? - Related jaegertracing#5330 ## Description of the changes - Partial replace deprecated function in `grpc-go@v1.64` - `grpc.Dial` => `grpc.NewClient` - `grpc.DialContext` => `grpc.NewClient` - FYI: jaegertracing#5330 (comment) - Refactor configmanager GetSamplingStrategy business logic - Fixed related test ## How was this change tested? - make lint - make test - Try & Error ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com> Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
## Which problem is this PR solving? - Part of #5330 ## Description of the changes - use grpc.NewClient - add extra test ## How was this change tested? - CI --------- Signed-off-by: Yuri Shkuro <github@ysh.us>
Last one #5443 |
In 1.63.x
grpc.Dial
is being replaced withgrpc.NewClient
that does not attempt to make a connection. Need to make code fixes to use the new API.This was originally breaking dependabot PR #5327, but gRPC later un-deprecated the Dial functions. Still, they will likely be deprecated in the future releases, so we need to migrate.
(Update) The only remaining place is
Validation:
The text was updated successfully, but these errors were encountered: