Skip to content

Commit 21d646e

Browse files
Chore: Update GO dependencies (#4064)
* update security go dependencies * fix uts * fix uts * remove last space line * fix linter issue * fix linter issue * update time package * revert cilium upgrade back * update client_go and grpc * gofmt pluginmanager_test.go * fix hubble_test * fix ParseReaderMetrics() --------- Co-authored-by: paulyu <[email protected]>
1 parent 93fee76 commit 21d646e

File tree

5 files changed

+113
-102
lines changed

5 files changed

+113
-102
lines changed

cns/deviceplugin/pluginmanager_test.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,17 @@ func TestPluginManagerStartStop(t *testing.T) {
9999
req := &v1beta1.AllocateRequest{
100100
ContainerRequests: []*v1beta1.ContainerAllocateRequest{
101101
{
102-
DevicesIDs: []string{"device-0", "device-1"},
102+
DevicesIds: []string{"device-0", "device-1"},
103103
},
104104
},
105105
}
106106
allocateResp := getAllocateResponse(t, vnetPluginEndpoint, req)
107107

108-
if len(allocateResp.ContainerResponses[0].Envs) != len(req.ContainerRequests[0].DevicesIDs) {
109-
t.Fatalf("expected allocations %v but received allocations %v", len(req.ContainerRequests[0].DevicesIDs), len(allocateResp.ContainerResponses[0].Envs))
108+
if len(allocateResp.GetContainerResponses()[0].GetEnvs()) != len(req.GetContainerRequests()[0].GetDevicesIds()) {
109+
t.Fatalf("expected allocations %v but received allocations %v",
110+
len(req.GetContainerRequests()[0].GetDevicesIds()),
111+
len(allocateResp.GetContainerResponses()[0].GetEnvs()),
112+
)
110113
}
111114

112115
// call getDevicePluginOptions method
@@ -142,6 +145,9 @@ func TestPluginManagerStartStop(t *testing.T) {
142145
}
143146

144147
type fakeKubelet struct {
148+
// Required by newer protoc-gen-go-grpc to satisfy v1beta1.RegistrationServer
149+
v1beta1.UnimplementedRegistrationServer
150+
145151
vnetPluginRegisterChan chan string
146152
ibPluginRegisterChan chan string
147153
pluginPrefix string

cns/deviceplugin/server.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ type deviceCounter interface {
2020
}
2121

2222
type Server struct {
23+
// NEW: embed the unimplemented server to satisfy the interface in newer gRPC/proto
24+
v1beta1.UnimplementedDevicePluginServer
25+
2326
address string
2427
logger *zap.Logger
2528
deviceCounter deviceCounter
@@ -89,13 +92,14 @@ func (s *Server) Ready(ctx context.Context) error {
8992
// We are not using this functionality currently
9093
func (s *Server) Allocate(_ context.Context, req *v1beta1.AllocateRequest) (*v1beta1.AllocateResponse, error) {
9194
s.logger.Info("allocate request", zap.Any("req", *req))
92-
resps := make([]*v1beta1.ContainerAllocateResponse, len(req.ContainerRequests))
93-
for i, containerReq := range req.ContainerRequests {
95+
crs := req.GetContainerRequests()
96+
resps := make([]*v1beta1.ContainerAllocateResponse, len(crs))
97+
for i, containerReq := range crs {
9498
resp := &v1beta1.ContainerAllocateResponse{
9599
Envs: make(map[string]string),
96100
}
97-
for j := range containerReq.DevicesIDs {
98-
resp.Envs[fmt.Sprintf("%s%d", devicePrefix, j)] = containerReq.DevicesIDs[j]
101+
for j, id := range containerReq.GetDevicesIds() {
102+
resp.Envs[fmt.Sprintf("%s%d", devicePrefix, j)] = id
99103
}
100104
resps[i] = resp
101105
}

go.mod

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module github.com/Azure/azure-container-networking
33
go 1.24.1
44

55
require (
6-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.0
7-
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.11.0
6+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1
7+
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.0
88
github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets v0.12.0
99
github.com/Masterminds/semver v1.5.0
1010
github.com/Microsoft/go-winio v0.6.2
@@ -28,18 +28,18 @@ require (
2828
github.com/onsi/gomega v1.37.0
2929
github.com/patrickmn/go-cache v2.1.0+incompatible
3030
github.com/pkg/errors v0.9.1
31-
github.com/prometheus/client_golang v1.23.0
31+
github.com/prometheus/client_golang v1.23.2
3232
github.com/prometheus/client_model v0.6.2
33-
github.com/spf13/cobra v1.9.1
33+
github.com/spf13/cobra v1.10.1
3434
github.com/spf13/pflag v1.0.10
35-
github.com/spf13/viper v1.20.1
35+
github.com/spf13/viper v1.21.0
3636
github.com/stretchr/testify v1.11.1
3737
go.uber.org/zap v1.27.0
3838
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
39-
golang.org/x/sys v0.35.0
40-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
41-
google.golang.org/grpc v1.75.0
42-
google.golang.org/protobuf v1.36.8
39+
golang.org/x/sys v0.36.0
40+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b // indirect
41+
google.golang.org/grpc v1.76.0
42+
google.golang.org/protobuf v1.36.10
4343
gopkg.in/natefinch/lumberjack.v2 v2.2.1
4444
k8s.io/api v0.34.1
4545
k8s.io/apiextensions-apiserver v0.34.1
@@ -55,7 +55,7 @@ require (
5555
code.cloudfoundry.org/clock v1.41.0 // indirect
5656
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect
5757
github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect
58-
github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 // indirect
58+
github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0 // indirect
5959
github.com/beorn7/perks v1.0.1 // indirect
6060
github.com/cespare/xxhash/v2 v2.3.0 // indirect
6161
github.com/coreos/go-iptables v0.8.0
@@ -75,43 +75,43 @@ require (
7575
github.com/kylelemons/godebug v1.1.0 // indirect
7676
github.com/labstack/echo/v4 v4.13.4
7777
github.com/labstack/gommon v0.4.2 // indirect
78-
github.com/mailru/easyjson v0.7.7 // indirect
78+
github.com/mailru/easyjson v0.9.1 // indirect
7979
github.com/mattn/go-colorable v0.1.14 // indirect
8080
github.com/mattn/go-isatty v0.0.20 // indirect
8181
github.com/mitchellh/mapstructure v1.5.0 // indirect
8282
github.com/moby/spdystream v0.5.0 // indirect
8383
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
8484
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
8585
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
86-
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
86+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
8787
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
8888
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
89-
github.com/prometheus/common v0.65.0
89+
github.com/prometheus/common v0.66.1
9090
github.com/prometheus/procfs v0.16.1 // indirect
9191
github.com/sirupsen/logrus v1.9.3
92-
github.com/spf13/afero v1.12.0 // indirect
93-
github.com/spf13/cast v1.7.1 // indirect
92+
github.com/spf13/afero v1.15.0 // indirect
93+
github.com/spf13/cast v1.10.0 // indirect
9494
github.com/subosito/gotenv v1.6.0 // indirect
9595
github.com/valyala/bytebufferpool v1.0.0 // indirect
9696
github.com/valyala/fasttemplate v1.2.2 // indirect
9797
github.com/vishvananda/netlink v1.3.1
9898
github.com/vishvananda/netns v0.0.5
9999
go.opencensus.io v0.24.0 // indirect
100100
go.uber.org/multierr v1.11.0 // indirect
101-
golang.org/x/crypto v0.41.0
102-
golang.org/x/net v0.43.0
103-
golang.org/x/oauth2 v0.30.0 // indirect
104-
golang.org/x/term v0.34.0 // indirect
105-
golang.org/x/text v0.28.0 // indirect
106-
golang.org/x/time v0.12.0
101+
golang.org/x/crypto v0.42.0
102+
golang.org/x/net v0.45.0
103+
golang.org/x/oauth2 v0.31.0 // indirect
104+
golang.org/x/term v0.35.0 // indirect
105+
golang.org/x/text v0.29.0 // indirect
106+
golang.org/x/time v0.13.0
107107
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
108108
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
109109
gopkg.in/fsnotify.v1 v1.4.7 // indirect
110110
gopkg.in/inf.v0 v0.9.1 // indirect
111111
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
112112
gopkg.in/yaml.v2 v2.4.0 // indirect
113113
gopkg.in/yaml.v3 v3.0.1 // indirect
114-
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
114+
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect
115115
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
116116
)
117117

@@ -125,9 +125,9 @@ require (
125125
github.com/cilium/cilium v1.15.16
126126
github.com/cilium/ebpf v0.19.0
127127
github.com/jsternberg/zap-logfmt v1.3.0
128-
golang.org/x/sync v0.16.0
128+
golang.org/x/sync v0.17.0
129129
gotest.tools/v3 v3.5.2
130-
k8s.io/kubectl v0.28.5
130+
k8s.io/kubectl v0.34.1
131131
sigs.k8s.io/yaml v1.6.0
132132
)
133133

@@ -147,7 +147,7 @@ require (
147147
github.com/go-openapi/spec v0.20.11 // indirect
148148
github.com/go-openapi/strfmt v0.21.9 // indirect
149149
github.com/go-openapi/validate v0.22.3 // indirect
150-
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
150+
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
151151
github.com/google/btree v1.1.3 // indirect
152152
github.com/google/gopacket v1.1.19 // indirect
153153
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
@@ -186,9 +186,9 @@ require (
186186
github.com/containerd/errdefs v0.3.0 // indirect
187187
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
188188
github.com/golang-jwt/jwt/v5 v5.3.0 // indirect
189-
github.com/sagikazarmark/locafero v0.7.0 // indirect
190-
github.com/sourcegraph/conc v0.3.0 // indirect
191-
k8s.io/kubelet v0.30.14
189+
github.com/sagikazarmark/locafero v0.11.0 // indirect
190+
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
191+
k8s.io/kubelet v0.34.1
192192
)
193193

194194
replace (

0 commit comments

Comments
 (0)