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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tariq1890
Copy link

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.

@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