浏览代码

Merge pull request #40032 from jmartin84/fix-grpc-withdialer-deprecation-warning

Fix grpc withdialer deprecation warning
Brian Goff 5 年之前
父节点
当前提交
47c5c67ed8
共有 2 个文件被更改,包括 1 次插入5 次删除
  1. 1 1
      daemon/daemon.go
  2. 0 4
      hack/validate/golangci-lint.yml

+ 1 - 1
daemon/daemon.go

@@ -889,7 +889,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
 	gopts := []grpc.DialOption{
 	gopts := []grpc.DialOption{
 		grpc.WithInsecure(),
 		grpc.WithInsecure(),
 		grpc.WithBackoffMaxDelay(3 * time.Second),
 		grpc.WithBackoffMaxDelay(3 * time.Second),
-		grpc.WithDialer(dialer.Dialer),
+		grpc.WithContextDialer(dialer.ContextDialer),
 
 
 		// TODO(stevvooe): We may need to allow configuration of this on the client.
 		// TODO(stevvooe): We may need to allow configuration of this on the client.
 		grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(defaults.DefaultMaxRecvMsgSize)),
 		grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(defaults.DefaultMaxRecvMsgSize)),

+ 0 - 4
hack/validate/golangci-lint.yml

@@ -74,10 +74,6 @@ issues:
     - text: "(G201|G202): SQL string (formatting|concatenation)"
     - text: "(G201|G202): SQL string (formatting|concatenation)"
       linters:
       linters:
         - gosec
         - gosec
-    # FIXME temporarily suppress these. See #39928
-    - text: "SA1019: grpc.WithDialer is deprecated"
-      linters:
-        - staticcheck
     # FIXME temporarily suppress these. See #39924
     # FIXME temporarily suppress these. See #39924
     - text: "SA1019: .*\\.Xattrs is deprecated: Use PAXRecords instead"
     - text: "SA1019: .*\\.Xattrs is deprecated: Use PAXRecords instead"
       linters:
       linters: