Closed
Description
What happened?
The linter isn't happy due to a deprecated GRPC antipattern being in use:
DEBU [gocritic] Final not used checks (2): filepathJoin, whyNoLint
test/nri/runtime.go:50:3: SA1019: grpc.WithBlock is deprecated: this DialOption is not supported by NewClient. Will be supported throughout 1.x. (staticcheck)
grpc.WithBlock(),
^
test/nri/runtime.go:51:3: SA1019: grpc.FailOnNonTempDialError is deprecated: this DialOption is not supported by NewClient. This API may be changed or removed in a later release. (staticcheck)
grpc.FailOnNonTempDialError(true),
^
test/nri/runtime.go:54:13: SA1019: grpc.DialContext is deprecated: use NewClient instead. Will be supported throughout 1.x. (staticcheck)
cc, err := grpc.DialContext(ctx, *crioSocket, dialOpts...)
^
3 issues:
* staticcheck: 3
According to grpc/grpc-go#7090, disabling the linter is a (temporary) option. I'm opening this bug report to make sure that an actual rewrite to non-deprecated code will happen in the future.
What did you expect to happen?
linter not to fail, production code not to be deprecated
How can we reproduce it (as minimally and precisely as possible)?
.
Anything else we need to know?
No response
CRI-O and Kubernetes version
$ crio --version
# paste output here
$ kubectl version --output=json
# paste output here
OS version
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here