Skip to content

Commit

Permalink
drop usage of deprecated package/methods
Browse files Browse the repository at this point in the history
Signed-off-by: Davanum Srinivas <[email protected]>
(cherry picked from commit 56e8cf9)
Signed-off-by: Kirtana Ashok <[email protected]>
  • Loading branch information
dims authored and kiashok committed Aug 16, 2024
1 parent 88ac0d9 commit b5e12a8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions cmd/ncproxy/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ func run(clicontext *cli.Context) error {
defer cancel()
opts = append(opts, grpc.WithBlock())
}

// TODO: use grpc.NewClient here instead
//nolint:staticcheck // SA1019: grpc.DialContext is deprecated
client, err := grpc.DialContext(dialCtx, conf.NodeNetSvcAddr, opts...)
if err != nil {
return fmt.Errorf("failed to connect to NodeNetworkService at address %s", conf.NodeNetSvcAddr)
Expand Down
3 changes: 3 additions & 0 deletions test/cri-containerd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ func createGRPCConn(ctx context.Context) (*grpc.ClientConn, error) {
if err != nil {
return nil, err
}

s // TODO: use grpc.NewClient here instead
//nolint:staticcheck // SA1019: grpc.DialContext is deprecated
return grpc.DialContext(ctx, addr,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithContextDialer(dialer))
Expand Down
5 changes: 4 additions & 1 deletion test/internal/containerd/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"github.com/containerd/containerd"
kubeutil "github.com/containerd/containerd/integration/remote/util"
"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/platforms"
"github.com/containerd/containerd/remotes"
"github.com/containerd/containerd/remotes/docker"
"github.com/containerd/containerd/remotes/docker/config"
"github.com/containerd/containerd/snapshots"
"github.com/containerd/errdefs"
"github.com/containerd/platforms"
"github.com/opencontainers/image-spec/identity"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
Expand All @@ -34,6 +34,9 @@ func createGRPCConn(ctx context.Context, address string) (*grpc.ClientConn, erro
if err != nil {
return nil, err
}

// TODO: use grpc.NewClient here instead
//nolint:staticcheck // SA1019: grpc.DialContext is deprecated
return grpc.DialContext(ctx, addr,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithContextDialer(dialer))
Expand Down
2 changes: 1 addition & 1 deletion test/pkg/images/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package images
import (
"fmt"

"github.com/containerd/containerd/platforms"
"github.com/containerd/errdefs"
"github.com/containerd/platforms"
)

const (
Expand Down

0 comments on commit b5e12a8

Please sign in to comment.