Skip to content

Commit 7d640c4

Browse files
refactor(grpc): remove deprecated grpc.Dial implementation.
Signed-off-by: Electronic-Waste <[email protected]>
1 parent 0225abc commit 7d640c4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmd/metricscollector/v1beta1/file-metricscollector/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ func watchMetricsFile(mFile string, stopRules stopRulesFlag, filters []string, f
311311
}
312312

313313
// Create connection and client for Early Stopping service.
314-
conn, err := grpc.Dial(*earlyStopServiceAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
314+
conn, err := grpc.NewClient(*earlyStopServiceAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
315315
if err != nil {
316316
klog.Fatalf("Could not connect to Early Stopping service, error: %v", err)
317317
}
@@ -433,7 +433,7 @@ func main() {
433433

434434
func reportMetrics(filters []string, fileFormat commonv1beta1.FileFormat) {
435435

436-
conn, err := grpc.Dial(*dbManagerServiceAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
436+
conn, err := grpc.NewClient(*dbManagerServiceAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
437437
if err != nil {
438438
klog.Fatalf("Could not connect to DB manager service, error: %v", err)
439439
}

pkg/common/v1beta1/katib_manager_util.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func GetDBManagerAddr() string {
4646

4747
func getKatibDBManagerClientAndConn() (*katibDBManagerClientAndConn, error) {
4848
addr := GetDBManagerAddr()
49-
conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
49+
conn, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
5050
if err != nil {
5151
return nil, err
5252
}

0 commit comments

Comments
 (0)