Skip to content

Comments

replace deprecated method grpc.DialContext in favour of grpc.NewClient#419

Open
tariq1890 wants to merge 1 commit intoNVIDIA:mainfrom
tariq1890:rm-grpc-dial-ctx
Open

replace deprecated method grpc.DialContext in favour of grpc.NewClient#419
tariq1890 wants to merge 1 commit intoNVIDIA:mainfrom
tariq1890:rm-grpc-dial-ctx

Conversation

@tariq1890
Copy link
Contributor

grpc.DialContext is deprecated and calls NewClient under the hood. We also remove the WithBlock call as the godoc of NewClient says that it is disregarded.

Signed-off-by: Tariq Ibrahim <tibrahim@nvidia.com>
@nvvfedorov
Copy link
Collaborator

I ran unit tests, they fail with the error like:

--- FAIL: TestProcessPodMapper_WithD_Different_Format_Of_DeviceID (9.21s)
    --- FAIL: TestProcessPodMapper_WithD_Different_Format_Of_DeviceID/when_type_uid,_pod_device_id_b8ea3855-276c-c9cb-b366-c6fa655957c5_metric_device_id_b8ea3855-276c-c9cb-b366-c6fa655957c5_and_gpu_device_ (1.02s)
        kubernetes_test.go:322:
            	Error Trace:	/home/vfedorov/Documents/Github/fork/dcgm-exporter/pkg/dcgmexporter/kubernetes_test.go:322
            	Error:      	Received unexpected error:
            	            	failure getting pod resources; err: rpc error: code = Unavailable desc = name resolver error: produced zero addresses

@leharbhatt-okta
Copy link

I ran unit tests, they fail with the error like:

--- FAIL: TestProcessPodMapper_WithD_Different_Format_Of_DeviceID (9.21s)
    --- FAIL: TestProcessPodMapper_WithD_Different_Format_Of_DeviceID/when_type_uid,_pod_device_id_b8ea3855-276c-c9cb-b366-c6fa655957c5_metric_device_id_b8ea3855-276c-c9cb-b366-c6fa655957c5_and_gpu_device_ (1.02s)
        kubernetes_test.go:322:
            	Error Trace:	/home/vfedorov/Documents/Github/fork/dcgm-exporter/pkg/dcgmexporter/kubernetes_test.go:322
            	Error:      	Received unexpected error:
            	            	failure getting pod resources; err: rpc error: code = Unavailable desc = name resolver error: produced zero addresses

You might want to set the scheme as passthrough. When using Dial/DialContext the default scheme is passthrough whereas with NewClient, it is dns.

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 this pull request may close these issues.

3 participants