Skip to content

Commit

Permalink
refactor(grpc): remove deprecated grpc.Dial implementation.
Browse files Browse the repository at this point in the history
Signed-off-by: Electronic-Waste <2690692950@qq.com>
  • Loading branch information
Electronic-Waste committed Jan 11, 2025
1 parent 0225abc commit 7d640c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/metricscollector/v1beta1/file-metricscollector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func watchMetricsFile(mFile string, stopRules stopRulesFlag, filters []string, f
}

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

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

conn, err := grpc.Dial(*dbManagerServiceAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.NewClient(*dbManagerServiceAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
klog.Fatalf("Could not connect to DB manager service, error: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/common/v1beta1/katib_manager_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func GetDBManagerAddr() string {

func getKatibDBManagerClientAndConn() (*katibDBManagerClientAndConn, error) {
addr := GetDBManagerAddr()
conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 7d640c4

Please sign in to comment.