From 945d14b1aa490aa8e662ffcc56f85c519369fc48 Mon Sep 17 00:00:00 2001 From: hc-github-team-consul-core Date: Thu, 16 May 2024 12:43:50 -0700 Subject: [PATCH] Backport of upgrade deep-copy version, upgrade go to 1.22.3 into release/1.18.x (#21128) * upgrade deep-copy version, upgrade go to 1.22.3 * upgrade mockery --------- Co-authored-by: Dhia Ayachi --- .changelog/21113.txt | 3 ++ .go-version | 2 +- Makefile | 6 ++-- agent/config/config.deepcopy.go | 13 ++++--- agent/consul/state/catalog_schema.deepcopy.go | 5 +-- agent/proxycfg/proxycfg.deepcopy.go | 2 +- agent/structs/structs.deepcopy.go | 2 +- .../pbacl/mock_ACLServiceClient.go | 10 +++++- .../pbacl/mock_ACLServiceServer.go | 10 +++++- .../pbacl/mock_UnsafeACLServiceServer.go | 2 +- .../mock_ConnectCAServiceClient.go | 10 +++++- .../mock_ConnectCAServiceServer.go | 10 +++++- .../mock_ConnectCAService_WatchRootsClient.go | 30 +++++++++++++++- .../mock_ConnectCAService_WatchRootsServer.go | 26 +++++++++++++- .../mock_UnsafeConnectCAServiceServer.go | 2 +- .../mock_DataplaneServiceClient.go | 10 +++++- .../mock_DataplaneServiceServer.go | 10 +++++- .../mock_UnsafeDataplaneServiceServer.go | 2 +- ...GetEnvoyBootstrapParamsRequest_NodeSpec.go | 2 +- .../pbdns/mock_DNSServiceClient.go | 6 +++- .../pbdns/mock_DNSServiceServer.go | 6 +++- .../pbdns/mock_UnsafeDNSServiceServer.go | 2 +- .../pbresource/mock_ResourceServiceClient.go | 34 ++++++++++++++++++- .../pbresource/mock_ResourceServiceServer.go | 34 ++++++++++++++++++- .../mock_ResourceService_WatchListClient.go | 30 +++++++++++++++- .../mock_ResourceService_WatchListServer.go | 26 +++++++++++++- .../mock_UnsafeResourceServiceServer.go | 2 +- .../pbresource/mock_isWatchEvent_Event.go | 2 +- .../mock_ServerDiscoveryServiceClient.go | 6 +++- .../mock_ServerDiscoveryServiceServer.go | 6 +++- ...rverDiscoveryService_WatchServersClient.go | 30 +++++++++++++++- ...rverDiscoveryService_WatchServersServer.go | 26 +++++++++++++- ...mock_UnsafeServerDiscoveryServiceServer.go | 2 +- .../protoc-gen-consul-rate-limit/main.go | 2 ++ 34 files changed, 331 insertions(+), 40 deletions(-) create mode 100644 .changelog/21113.txt diff --git a/.changelog/21113.txt b/.changelog/21113.txt new file mode 100644 index 0000000000..e1e153f0ac --- /dev/null +++ b/.changelog/21113.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +upgrade go version to v1.22.3. +``` diff --git a/.go-version b/.go-version index ae7bbdf047..89144dbc38 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.21.10 +1.22.3 diff --git a/Makefile b/Makefile index ea2113c618..75a7b5b742 100644 --- a/Makefile +++ b/Makefile @@ -11,14 +11,14 @@ GO_MODULES := $(shell find . -name go.mod -exec dirname {} \; | grep -v "proto-g # or the string @DEV to imply use what is currently installed locally. ### GOLANGCI_LINT_VERSION='v1.55.2' -MOCKERY_VERSION='v2.37.1' +MOCKERY_VERSION='v2.41.0' BUF_VERSION='v1.26.0' PROTOC_GEN_GO_GRPC_VERSION='v1.2.0' -MOG_VERSION='v0.4.1' +MOG_VERSION='v0.4.2' PROTOC_GO_INJECT_TAG_VERSION='v1.3.0' PROTOC_GEN_GO_BINARY_VERSION='v0.1.0' -DEEP_COPY_VERSION='bc3f5aa5735d8a54961580a3a24422c308c831c2' +DEEP_COPY_VERSION='e112476c0181d3d69067bac191f9b6bcda2ce812' COPYWRITE_TOOL_VERSION='v0.16.4' LINT_CONSUL_RETRY_VERSION='v1.4.0' # Go imports formatter diff --git a/agent/config/config.deepcopy.go b/agent/config/config.deepcopy.go index 2a5ebfce27..bd9b85fca4 100644 --- a/agent/config/config.deepcopy.go +++ b/agent/config/config.deepcopy.go @@ -1,7 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -// generated by deep-copy -pointer-receiver -o ./config.deepcopy.go -type RuntimeConfig ./; DO NOT EDIT. +// Code generated by deep-copy -pointer-receiver -o ./config.deepcopy.go -type RuntimeConfig ./; DO NOT EDIT. package config @@ -359,6 +356,10 @@ func (o *RuntimeConfig) DeepCopy() *RuntimeConfig { } } } + if o.Cloud.TLSConfig.Certificates[i5].Leaf.Policies != nil { + cp.Cloud.TLSConfig.Certificates[i5].Leaf.Policies = make([]x509.OID, len(o.Cloud.TLSConfig.Certificates[i5].Leaf.Policies)) + copy(cp.Cloud.TLSConfig.Certificates[i5].Leaf.Policies, o.Cloud.TLSConfig.Certificates[i5].Leaf.Policies) + } } } } @@ -698,6 +699,10 @@ func (o *RuntimeConfig) DeepCopy() *RuntimeConfig { } } } + if v5.Leaf.Policies != nil { + cp_Cloud_TLSConfig_NameToCertificate_v5.Leaf.Policies = make([]x509.OID, len(v5.Leaf.Policies)) + copy(cp_Cloud_TLSConfig_NameToCertificate_v5.Leaf.Policies, v5.Leaf.Policies) + } } } cp.Cloud.TLSConfig.NameToCertificate[k5] = cp_Cloud_TLSConfig_NameToCertificate_v5 diff --git a/agent/consul/state/catalog_schema.deepcopy.go b/agent/consul/state/catalog_schema.deepcopy.go index af4d430d2f..43937edd87 100644 --- a/agent/consul/state/catalog_schema.deepcopy.go +++ b/agent/consul/state/catalog_schema.deepcopy.go @@ -1,7 +1,4 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -// generated by deep-copy -pointer-receiver -o ./catalog_schema.deepcopy.go -type upstreamDownstream ./; DO NOT EDIT. +// Code generated by deep-copy -pointer-receiver -o ./catalog_schema.deepcopy.go -type upstreamDownstream ./; DO NOT EDIT. package state diff --git a/agent/proxycfg/proxycfg.deepcopy.go b/agent/proxycfg/proxycfg.deepcopy.go index 36de467ed1..e1cc919656 100644 --- a/agent/proxycfg/proxycfg.deepcopy.go +++ b/agent/proxycfg/proxycfg.deepcopy.go @@ -1,4 +1,4 @@ -// generated by deep-copy -pointer-receiver -o ./proxycfg.deepcopy.go -type ConfigSnapshot -type ConfigSnapshotUpstreams -type PeerServersValue -type PeeringServiceValue -type configSnapshotAPIGateway -type configSnapshotConnectProxy -type configSnapshotIngressGateway -type configSnapshotMeshGateway -type configSnapshotTerminatingGateway ./; DO NOT EDIT. +// Code generated by deep-copy -pointer-receiver -o ./proxycfg.deepcopy.go -type ConfigSnapshot -type ConfigSnapshotUpstreams -type PeerServersValue -type PeeringServiceValue -type configSnapshotAPIGateway -type configSnapshotConnectProxy -type configSnapshotIngressGateway -type configSnapshotMeshGateway -type configSnapshotTerminatingGateway ./; DO NOT EDIT. package proxycfg diff --git a/agent/structs/structs.deepcopy.go b/agent/structs/structs.deepcopy.go index 98b118eb21..f53f198b1d 100644 --- a/agent/structs/structs.deepcopy.go +++ b/agent/structs/structs.deepcopy.go @@ -1,4 +1,4 @@ -// generated by deep-copy -pointer-receiver -o ./structs.deepcopy.go -type APIGatewayListener -type BoundAPIGatewayListener -type CARoot -type CheckServiceNode -type CheckType -type CompiledDiscoveryChain -type ConnectProxyConfig -type DiscoveryFailover -type DiscoveryGraphNode -type DiscoveryResolver -type DiscoveryRoute -type DiscoverySplit -type ExposeConfig -type ExportedServicesConfigEntry -type GatewayService -type GatewayServiceTLSConfig -type HTTPHeaderModifiers -type HTTPRouteConfigEntry -type HashPolicy -type HealthCheck -type IndexedCARoots -type IngressListener -type InlineCertificateConfigEntry -type Intention -type IntentionPermission -type LoadBalancer -type MeshConfigEntry -type MeshDirectionalTLSConfig -type MeshTLSConfig -type Node -type NodeService -type PeeringServiceMeta -type ServiceConfigEntry -type ServiceConfigResponse -type ServiceConnect -type ServiceDefinition -type ServiceResolverConfigEntry -type ServiceResolverFailover -type ServiceRoute -type ServiceRouteDestination -type ServiceRouteMatch -type TCPRouteConfigEntry -type Upstream -type UpstreamConfiguration -type Status -type BoundAPIGatewayConfigEntry ./; DO NOT EDIT. +// Code generated by deep-copy -pointer-receiver -o ./structs.deepcopy.go -type APIGatewayListener -type BoundAPIGatewayListener -type CARoot -type CheckServiceNode -type CheckType -type CompiledDiscoveryChain -type ConnectProxyConfig -type DiscoveryFailover -type DiscoveryGraphNode -type DiscoveryResolver -type DiscoveryRoute -type DiscoverySplit -type ExposeConfig -type ExportedServicesConfigEntry -type GatewayService -type GatewayServiceTLSConfig -type HTTPHeaderModifiers -type HTTPRouteConfigEntry -type HashPolicy -type HealthCheck -type IndexedCARoots -type IngressListener -type InlineCertificateConfigEntry -type Intention -type IntentionPermission -type LoadBalancer -type MeshConfigEntry -type MeshDirectionalTLSConfig -type MeshTLSConfig -type Node -type NodeService -type PeeringServiceMeta -type ServiceConfigEntry -type ServiceConfigResponse -type ServiceConnect -type ServiceDefinition -type ServiceResolverConfigEntry -type ServiceResolverFailover -type ServiceRoute -type ServiceRouteDestination -type ServiceRouteMatch -type TCPRouteConfigEntry -type Upstream -type UpstreamConfiguration -type Status -type BoundAPIGatewayConfigEntry ./; DO NOT EDIT. package structs diff --git a/grpcmocks/proto-public/pbacl/mock_ACLServiceClient.go b/grpcmocks/proto-public/pbacl/mock_ACLServiceClient.go index 5a32838c7a..b4f5f29e28 100644 --- a/grpcmocks/proto-public/pbacl/mock_ACLServiceClient.go +++ b/grpcmocks/proto-public/pbacl/mock_ACLServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbacl @@ -36,6 +36,10 @@ func (_m *ACLServiceClient) Login(ctx context.Context, in *pbacl.LoginRequest, o _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Login") + } + var r0 *pbacl.LoginResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbacl.LoginRequest, ...grpc.CallOption) (*pbacl.LoginResponse, error)); ok { @@ -106,6 +110,10 @@ func (_m *ACLServiceClient) Logout(ctx context.Context, in *pbacl.LogoutRequest, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Logout") + } + var r0 *pbacl.LogoutResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbacl.LogoutRequest, ...grpc.CallOption) (*pbacl.LogoutResponse, error)); ok { diff --git a/grpcmocks/proto-public/pbacl/mock_ACLServiceServer.go b/grpcmocks/proto-public/pbacl/mock_ACLServiceServer.go index 0c4ab3c48e..98803d82df 100644 --- a/grpcmocks/proto-public/pbacl/mock_ACLServiceServer.go +++ b/grpcmocks/proto-public/pbacl/mock_ACLServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbacl @@ -26,6 +26,10 @@ func (_m *ACLServiceServer) EXPECT() *ACLServiceServer_Expecter { func (_m *ACLServiceServer) Login(_a0 context.Context, _a1 *pbacl.LoginRequest) (*pbacl.LoginResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Login") + } + var r0 *pbacl.LoginResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbacl.LoginRequest) (*pbacl.LoginResponse, error)); ok { @@ -81,6 +85,10 @@ func (_c *ACLServiceServer_Login_Call) RunAndReturn(run func(context.Context, *p func (_m *ACLServiceServer) Logout(_a0 context.Context, _a1 *pbacl.LogoutRequest) (*pbacl.LogoutResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Logout") + } + var r0 *pbacl.LogoutResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbacl.LogoutRequest) (*pbacl.LogoutResponse, error)); ok { diff --git a/grpcmocks/proto-public/pbacl/mock_UnsafeACLServiceServer.go b/grpcmocks/proto-public/pbacl/mock_UnsafeACLServiceServer.go index 353dcac269..21572b566e 100644 --- a/grpcmocks/proto-public/pbacl/mock_UnsafeACLServiceServer.go +++ b/grpcmocks/proto-public/pbacl/mock_UnsafeACLServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbacl diff --git a/grpcmocks/proto-public/pbconnectca/mock_ConnectCAServiceClient.go b/grpcmocks/proto-public/pbconnectca/mock_ConnectCAServiceClient.go index 4f5ca789a5..58ad21c26c 100644 --- a/grpcmocks/proto-public/pbconnectca/mock_ConnectCAServiceClient.go +++ b/grpcmocks/proto-public/pbconnectca/mock_ConnectCAServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbconnectca @@ -36,6 +36,10 @@ func (_m *ConnectCAServiceClient) Sign(ctx context.Context, in *pbconnectca.Sign _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Sign") + } + var r0 *pbconnectca.SignResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbconnectca.SignRequest, ...grpc.CallOption) (*pbconnectca.SignResponse, error)); ok { @@ -106,6 +110,10 @@ func (_m *ConnectCAServiceClient) WatchRoots(ctx context.Context, in *pbconnectc _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WatchRoots") + } + var r0 pbconnectca.ConnectCAService_WatchRootsClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbconnectca.WatchRootsRequest, ...grpc.CallOption) (pbconnectca.ConnectCAService_WatchRootsClient, error)); ok { diff --git a/grpcmocks/proto-public/pbconnectca/mock_ConnectCAServiceServer.go b/grpcmocks/proto-public/pbconnectca/mock_ConnectCAServiceServer.go index 0d2724f8bc..086d6840fc 100644 --- a/grpcmocks/proto-public/pbconnectca/mock_ConnectCAServiceServer.go +++ b/grpcmocks/proto-public/pbconnectca/mock_ConnectCAServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbconnectca @@ -26,6 +26,10 @@ func (_m *ConnectCAServiceServer) EXPECT() *ConnectCAServiceServer_Expecter { func (_m *ConnectCAServiceServer) Sign(_a0 context.Context, _a1 *pbconnectca.SignRequest) (*pbconnectca.SignResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Sign") + } + var r0 *pbconnectca.SignResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbconnectca.SignRequest) (*pbconnectca.SignResponse, error)); ok { @@ -81,6 +85,10 @@ func (_c *ConnectCAServiceServer_Sign_Call) RunAndReturn(run func(context.Contex func (_m *ConnectCAServiceServer) WatchRoots(_a0 *pbconnectca.WatchRootsRequest, _a1 pbconnectca.ConnectCAService_WatchRootsServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for WatchRoots") + } + var r0 error if rf, ok := ret.Get(0).(func(*pbconnectca.WatchRootsRequest, pbconnectca.ConnectCAService_WatchRootsServer) error); ok { r0 = rf(_a0, _a1) diff --git a/grpcmocks/proto-public/pbconnectca/mock_ConnectCAService_WatchRootsClient.go b/grpcmocks/proto-public/pbconnectca/mock_ConnectCAService_WatchRootsClient.go index ec54109509..6f545005b9 100644 --- a/grpcmocks/proto-public/pbconnectca/mock_ConnectCAService_WatchRootsClient.go +++ b/grpcmocks/proto-public/pbconnectca/mock_ConnectCAService_WatchRootsClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbconnectca @@ -28,6 +28,10 @@ func (_m *ConnectCAService_WatchRootsClient) EXPECT() *ConnectCAService_WatchRoo func (_m *ConnectCAService_WatchRootsClient) CloseSend() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CloseSend") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -69,6 +73,10 @@ func (_c *ConnectCAService_WatchRootsClient_CloseSend_Call) RunAndReturn(run fun func (_m *ConnectCAService_WatchRootsClient) Context() context.Context { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Context") + } + var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -112,6 +120,10 @@ func (_c *ConnectCAService_WatchRootsClient_Context_Call) RunAndReturn(run func( func (_m *ConnectCAService_WatchRootsClient) Header() (metadata.MD, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Header") + } + var r0 metadata.MD var r1 error if rf, ok := ret.Get(0).(func() (metadata.MD, error)); ok { @@ -165,6 +177,10 @@ func (_c *ConnectCAService_WatchRootsClient_Header_Call) RunAndReturn(run func() func (_m *ConnectCAService_WatchRootsClient) Recv() (*pbconnectca.WatchRootsResponse, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Recv") + } + var r0 *pbconnectca.WatchRootsResponse var r1 error if rf, ok := ret.Get(0).(func() (*pbconnectca.WatchRootsResponse, error)); ok { @@ -218,6 +234,10 @@ func (_c *ConnectCAService_WatchRootsClient_Recv_Call) RunAndReturn(run func() ( func (_m *ConnectCAService_WatchRootsClient) RecvMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for RecvMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -260,6 +280,10 @@ func (_c *ConnectCAService_WatchRootsClient_RecvMsg_Call) RunAndReturn(run func( func (_m *ConnectCAService_WatchRootsClient) SendMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for SendMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -302,6 +326,10 @@ func (_c *ConnectCAService_WatchRootsClient_SendMsg_Call) RunAndReturn(run func( func (_m *ConnectCAService_WatchRootsClient) Trailer() metadata.MD { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Trailer") + } + var r0 metadata.MD if rf, ok := ret.Get(0).(func() metadata.MD); ok { r0 = rf() diff --git a/grpcmocks/proto-public/pbconnectca/mock_ConnectCAService_WatchRootsServer.go b/grpcmocks/proto-public/pbconnectca/mock_ConnectCAService_WatchRootsServer.go index f728702161..4ca2d667e2 100644 --- a/grpcmocks/proto-public/pbconnectca/mock_ConnectCAService_WatchRootsServer.go +++ b/grpcmocks/proto-public/pbconnectca/mock_ConnectCAService_WatchRootsServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbconnectca @@ -28,6 +28,10 @@ func (_m *ConnectCAService_WatchRootsServer) EXPECT() *ConnectCAService_WatchRoo func (_m *ConnectCAService_WatchRootsServer) Context() context.Context { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Context") + } + var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -71,6 +75,10 @@ func (_c *ConnectCAService_WatchRootsServer_Context_Call) RunAndReturn(run func( func (_m *ConnectCAService_WatchRootsServer) RecvMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for RecvMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -113,6 +121,10 @@ func (_c *ConnectCAService_WatchRootsServer_RecvMsg_Call) RunAndReturn(run func( func (_m *ConnectCAService_WatchRootsServer) Send(_a0 *pbconnectca.WatchRootsResponse) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 error if rf, ok := ret.Get(0).(func(*pbconnectca.WatchRootsResponse) error); ok { r0 = rf(_a0) @@ -155,6 +167,10 @@ func (_c *ConnectCAService_WatchRootsServer_Send_Call) RunAndReturn(run func(*pb func (_m *ConnectCAService_WatchRootsServer) SendHeader(_a0 metadata.MD) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SendHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { r0 = rf(_a0) @@ -197,6 +213,10 @@ func (_c *ConnectCAService_WatchRootsServer_SendHeader_Call) RunAndReturn(run fu func (_m *ConnectCAService_WatchRootsServer) SendMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for SendMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -239,6 +259,10 @@ func (_c *ConnectCAService_WatchRootsServer_SendMsg_Call) RunAndReturn(run func( func (_m *ConnectCAService_WatchRootsServer) SetHeader(_a0 metadata.MD) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SetHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { r0 = rf(_a0) diff --git a/grpcmocks/proto-public/pbconnectca/mock_UnsafeConnectCAServiceServer.go b/grpcmocks/proto-public/pbconnectca/mock_UnsafeConnectCAServiceServer.go index 4f5e781c78..e740378bd2 100644 --- a/grpcmocks/proto-public/pbconnectca/mock_UnsafeConnectCAServiceServer.go +++ b/grpcmocks/proto-public/pbconnectca/mock_UnsafeConnectCAServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbconnectca diff --git a/grpcmocks/proto-public/pbdataplane/mock_DataplaneServiceClient.go b/grpcmocks/proto-public/pbdataplane/mock_DataplaneServiceClient.go index 272ccbf98a..3c8332f897 100644 --- a/grpcmocks/proto-public/pbdataplane/mock_DataplaneServiceClient.go +++ b/grpcmocks/proto-public/pbdataplane/mock_DataplaneServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbdataplane @@ -36,6 +36,10 @@ func (_m *DataplaneServiceClient) GetEnvoyBootstrapParams(ctx context.Context, i _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetEnvoyBootstrapParams") + } + var r0 *pbdataplane.GetEnvoyBootstrapParamsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbdataplane.GetEnvoyBootstrapParamsRequest, ...grpc.CallOption) (*pbdataplane.GetEnvoyBootstrapParamsResponse, error)); ok { @@ -106,6 +110,10 @@ func (_m *DataplaneServiceClient) GetSupportedDataplaneFeatures(ctx context.Cont _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetSupportedDataplaneFeatures") + } + var r0 *pbdataplane.GetSupportedDataplaneFeaturesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbdataplane.GetSupportedDataplaneFeaturesRequest, ...grpc.CallOption) (*pbdataplane.GetSupportedDataplaneFeaturesResponse, error)); ok { diff --git a/grpcmocks/proto-public/pbdataplane/mock_DataplaneServiceServer.go b/grpcmocks/proto-public/pbdataplane/mock_DataplaneServiceServer.go index 473bbd88b9..826137e0e8 100644 --- a/grpcmocks/proto-public/pbdataplane/mock_DataplaneServiceServer.go +++ b/grpcmocks/proto-public/pbdataplane/mock_DataplaneServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbdataplane @@ -26,6 +26,10 @@ func (_m *DataplaneServiceServer) EXPECT() *DataplaneServiceServer_Expecter { func (_m *DataplaneServiceServer) GetEnvoyBootstrapParams(_a0 context.Context, _a1 *pbdataplane.GetEnvoyBootstrapParamsRequest) (*pbdataplane.GetEnvoyBootstrapParamsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetEnvoyBootstrapParams") + } + var r0 *pbdataplane.GetEnvoyBootstrapParamsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbdataplane.GetEnvoyBootstrapParamsRequest) (*pbdataplane.GetEnvoyBootstrapParamsResponse, error)); ok { @@ -81,6 +85,10 @@ func (_c *DataplaneServiceServer_GetEnvoyBootstrapParams_Call) RunAndReturn(run func (_m *DataplaneServiceServer) GetSupportedDataplaneFeatures(_a0 context.Context, _a1 *pbdataplane.GetSupportedDataplaneFeaturesRequest) (*pbdataplane.GetSupportedDataplaneFeaturesResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetSupportedDataplaneFeatures") + } + var r0 *pbdataplane.GetSupportedDataplaneFeaturesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbdataplane.GetSupportedDataplaneFeaturesRequest) (*pbdataplane.GetSupportedDataplaneFeaturesResponse, error)); ok { diff --git a/grpcmocks/proto-public/pbdataplane/mock_UnsafeDataplaneServiceServer.go b/grpcmocks/proto-public/pbdataplane/mock_UnsafeDataplaneServiceServer.go index 5053b60181..077c5371ba 100644 --- a/grpcmocks/proto-public/pbdataplane/mock_UnsafeDataplaneServiceServer.go +++ b/grpcmocks/proto-public/pbdataplane/mock_UnsafeDataplaneServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbdataplane diff --git a/grpcmocks/proto-public/pbdataplane/mock_isGetEnvoyBootstrapParamsRequest_NodeSpec.go b/grpcmocks/proto-public/pbdataplane/mock_isGetEnvoyBootstrapParamsRequest_NodeSpec.go index acd420047f..98f54341ce 100644 --- a/grpcmocks/proto-public/pbdataplane/mock_isGetEnvoyBootstrapParamsRequest_NodeSpec.go +++ b/grpcmocks/proto-public/pbdataplane/mock_isGetEnvoyBootstrapParamsRequest_NodeSpec.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbdataplane diff --git a/grpcmocks/proto-public/pbdns/mock_DNSServiceClient.go b/grpcmocks/proto-public/pbdns/mock_DNSServiceClient.go index 8da316902a..0b0e9496a0 100644 --- a/grpcmocks/proto-public/pbdns/mock_DNSServiceClient.go +++ b/grpcmocks/proto-public/pbdns/mock_DNSServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbdns @@ -36,6 +36,10 @@ func (_m *DNSServiceClient) Query(ctx context.Context, in *pbdns.QueryRequest, o _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 *pbdns.QueryResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbdns.QueryRequest, ...grpc.CallOption) (*pbdns.QueryResponse, error)); ok { diff --git a/grpcmocks/proto-public/pbdns/mock_DNSServiceServer.go b/grpcmocks/proto-public/pbdns/mock_DNSServiceServer.go index f0f70a6364..eceb767558 100644 --- a/grpcmocks/proto-public/pbdns/mock_DNSServiceServer.go +++ b/grpcmocks/proto-public/pbdns/mock_DNSServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbdns @@ -26,6 +26,10 @@ func (_m *DNSServiceServer) EXPECT() *DNSServiceServer_Expecter { func (_m *DNSServiceServer) Query(_a0 context.Context, _a1 *pbdns.QueryRequest) (*pbdns.QueryResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 *pbdns.QueryResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbdns.QueryRequest) (*pbdns.QueryResponse, error)); ok { diff --git a/grpcmocks/proto-public/pbdns/mock_UnsafeDNSServiceServer.go b/grpcmocks/proto-public/pbdns/mock_UnsafeDNSServiceServer.go index e53efcdfe2..06a1f30e70 100644 --- a/grpcmocks/proto-public/pbdns/mock_UnsafeDNSServiceServer.go +++ b/grpcmocks/proto-public/pbdns/mock_UnsafeDNSServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbdns diff --git a/grpcmocks/proto-public/pbresource/mock_ResourceServiceClient.go b/grpcmocks/proto-public/pbresource/mock_ResourceServiceClient.go index 09efcff3c5..fc49e0f50d 100644 --- a/grpcmocks/proto-public/pbresource/mock_ResourceServiceClient.go +++ b/grpcmocks/proto-public/pbresource/mock_ResourceServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbresource @@ -36,6 +36,10 @@ func (_m *ResourceServiceClient) Delete(ctx context.Context, in *pbresource.Dele _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 *pbresource.DeleteResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.DeleteRequest, ...grpc.CallOption) (*pbresource.DeleteResponse, error)); ok { @@ -106,6 +110,10 @@ func (_m *ResourceServiceClient) List(ctx context.Context, in *pbresource.ListRe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *pbresource.ListResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.ListRequest, ...grpc.CallOption) (*pbresource.ListResponse, error)); ok { @@ -176,6 +184,10 @@ func (_m *ResourceServiceClient) ListByOwner(ctx context.Context, in *pbresource _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListByOwner") + } + var r0 *pbresource.ListByOwnerResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.ListByOwnerRequest, ...grpc.CallOption) (*pbresource.ListByOwnerResponse, error)); ok { @@ -246,6 +258,10 @@ func (_m *ResourceServiceClient) MutateAndValidate(ctx context.Context, in *pbre _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for MutateAndValidate") + } + var r0 *pbresource.MutateAndValidateResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.MutateAndValidateRequest, ...grpc.CallOption) (*pbresource.MutateAndValidateResponse, error)); ok { @@ -316,6 +332,10 @@ func (_m *ResourceServiceClient) Read(ctx context.Context, in *pbresource.ReadRe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Read") + } + var r0 *pbresource.ReadResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.ReadRequest, ...grpc.CallOption) (*pbresource.ReadResponse, error)); ok { @@ -386,6 +406,10 @@ func (_m *ResourceServiceClient) WatchList(ctx context.Context, in *pbresource.W _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WatchList") + } + var r0 pbresource.ResourceService_WatchListClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.WatchListRequest, ...grpc.CallOption) (pbresource.ResourceService_WatchListClient, error)); ok { @@ -456,6 +480,10 @@ func (_m *ResourceServiceClient) Write(ctx context.Context, in *pbresource.Write _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Write") + } + var r0 *pbresource.WriteResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.WriteRequest, ...grpc.CallOption) (*pbresource.WriteResponse, error)); ok { @@ -526,6 +554,10 @@ func (_m *ResourceServiceClient) WriteStatus(ctx context.Context, in *pbresource _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WriteStatus") + } + var r0 *pbresource.WriteStatusResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.WriteStatusRequest, ...grpc.CallOption) (*pbresource.WriteStatusResponse, error)); ok { diff --git a/grpcmocks/proto-public/pbresource/mock_ResourceServiceServer.go b/grpcmocks/proto-public/pbresource/mock_ResourceServiceServer.go index 2192f40c97..3ed07e777d 100644 --- a/grpcmocks/proto-public/pbresource/mock_ResourceServiceServer.go +++ b/grpcmocks/proto-public/pbresource/mock_ResourceServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbresource @@ -26,6 +26,10 @@ func (_m *ResourceServiceServer) EXPECT() *ResourceServiceServer_Expecter { func (_m *ResourceServiceServer) Delete(_a0 context.Context, _a1 *pbresource.DeleteRequest) (*pbresource.DeleteResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 *pbresource.DeleteResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.DeleteRequest) (*pbresource.DeleteResponse, error)); ok { @@ -81,6 +85,10 @@ func (_c *ResourceServiceServer_Delete_Call) RunAndReturn(run func(context.Conte func (_m *ResourceServiceServer) List(_a0 context.Context, _a1 *pbresource.ListRequest) (*pbresource.ListResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *pbresource.ListResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.ListRequest) (*pbresource.ListResponse, error)); ok { @@ -136,6 +144,10 @@ func (_c *ResourceServiceServer_List_Call) RunAndReturn(run func(context.Context func (_m *ResourceServiceServer) ListByOwner(_a0 context.Context, _a1 *pbresource.ListByOwnerRequest) (*pbresource.ListByOwnerResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListByOwner") + } + var r0 *pbresource.ListByOwnerResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.ListByOwnerRequest) (*pbresource.ListByOwnerResponse, error)); ok { @@ -191,6 +203,10 @@ func (_c *ResourceServiceServer_ListByOwner_Call) RunAndReturn(run func(context. func (_m *ResourceServiceServer) MutateAndValidate(_a0 context.Context, _a1 *pbresource.MutateAndValidateRequest) (*pbresource.MutateAndValidateResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for MutateAndValidate") + } + var r0 *pbresource.MutateAndValidateResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.MutateAndValidateRequest) (*pbresource.MutateAndValidateResponse, error)); ok { @@ -246,6 +262,10 @@ func (_c *ResourceServiceServer_MutateAndValidate_Call) RunAndReturn(run func(co func (_m *ResourceServiceServer) Read(_a0 context.Context, _a1 *pbresource.ReadRequest) (*pbresource.ReadResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Read") + } + var r0 *pbresource.ReadResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.ReadRequest) (*pbresource.ReadResponse, error)); ok { @@ -301,6 +321,10 @@ func (_c *ResourceServiceServer_Read_Call) RunAndReturn(run func(context.Context func (_m *ResourceServiceServer) WatchList(_a0 *pbresource.WatchListRequest, _a1 pbresource.ResourceService_WatchListServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for WatchList") + } + var r0 error if rf, ok := ret.Get(0).(func(*pbresource.WatchListRequest, pbresource.ResourceService_WatchListServer) error); ok { r0 = rf(_a0, _a1) @@ -344,6 +368,10 @@ func (_c *ResourceServiceServer_WatchList_Call) RunAndReturn(run func(*pbresourc func (_m *ResourceServiceServer) Write(_a0 context.Context, _a1 *pbresource.WriteRequest) (*pbresource.WriteResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Write") + } + var r0 *pbresource.WriteResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.WriteRequest) (*pbresource.WriteResponse, error)); ok { @@ -399,6 +427,10 @@ func (_c *ResourceServiceServer_Write_Call) RunAndReturn(run func(context.Contex func (_m *ResourceServiceServer) WriteStatus(_a0 context.Context, _a1 *pbresource.WriteStatusRequest) (*pbresource.WriteStatusResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for WriteStatus") + } + var r0 *pbresource.WriteStatusResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbresource.WriteStatusRequest) (*pbresource.WriteStatusResponse, error)); ok { diff --git a/grpcmocks/proto-public/pbresource/mock_ResourceService_WatchListClient.go b/grpcmocks/proto-public/pbresource/mock_ResourceService_WatchListClient.go index b6fb41b073..60df7d5cc6 100644 --- a/grpcmocks/proto-public/pbresource/mock_ResourceService_WatchListClient.go +++ b/grpcmocks/proto-public/pbresource/mock_ResourceService_WatchListClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbresource @@ -28,6 +28,10 @@ func (_m *ResourceService_WatchListClient) EXPECT() *ResourceService_WatchListCl func (_m *ResourceService_WatchListClient) CloseSend() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CloseSend") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -69,6 +73,10 @@ func (_c *ResourceService_WatchListClient_CloseSend_Call) RunAndReturn(run func( func (_m *ResourceService_WatchListClient) Context() context.Context { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Context") + } + var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -112,6 +120,10 @@ func (_c *ResourceService_WatchListClient_Context_Call) RunAndReturn(run func() func (_m *ResourceService_WatchListClient) Header() (metadata.MD, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Header") + } + var r0 metadata.MD var r1 error if rf, ok := ret.Get(0).(func() (metadata.MD, error)); ok { @@ -165,6 +177,10 @@ func (_c *ResourceService_WatchListClient_Header_Call) RunAndReturn(run func() ( func (_m *ResourceService_WatchListClient) Recv() (*pbresource.WatchEvent, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Recv") + } + var r0 *pbresource.WatchEvent var r1 error if rf, ok := ret.Get(0).(func() (*pbresource.WatchEvent, error)); ok { @@ -218,6 +234,10 @@ func (_c *ResourceService_WatchListClient_Recv_Call) RunAndReturn(run func() (*p func (_m *ResourceService_WatchListClient) RecvMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for RecvMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -260,6 +280,10 @@ func (_c *ResourceService_WatchListClient_RecvMsg_Call) RunAndReturn(run func(in func (_m *ResourceService_WatchListClient) SendMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for SendMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -302,6 +326,10 @@ func (_c *ResourceService_WatchListClient_SendMsg_Call) RunAndReturn(run func(in func (_m *ResourceService_WatchListClient) Trailer() metadata.MD { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Trailer") + } + var r0 metadata.MD if rf, ok := ret.Get(0).(func() metadata.MD); ok { r0 = rf() diff --git a/grpcmocks/proto-public/pbresource/mock_ResourceService_WatchListServer.go b/grpcmocks/proto-public/pbresource/mock_ResourceService_WatchListServer.go index 1b9dee399f..df2158cb64 100644 --- a/grpcmocks/proto-public/pbresource/mock_ResourceService_WatchListServer.go +++ b/grpcmocks/proto-public/pbresource/mock_ResourceService_WatchListServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbresource @@ -28,6 +28,10 @@ func (_m *ResourceService_WatchListServer) EXPECT() *ResourceService_WatchListSe func (_m *ResourceService_WatchListServer) Context() context.Context { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Context") + } + var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -71,6 +75,10 @@ func (_c *ResourceService_WatchListServer_Context_Call) RunAndReturn(run func() func (_m *ResourceService_WatchListServer) RecvMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for RecvMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -113,6 +121,10 @@ func (_c *ResourceService_WatchListServer_RecvMsg_Call) RunAndReturn(run func(in func (_m *ResourceService_WatchListServer) Send(_a0 *pbresource.WatchEvent) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 error if rf, ok := ret.Get(0).(func(*pbresource.WatchEvent) error); ok { r0 = rf(_a0) @@ -155,6 +167,10 @@ func (_c *ResourceService_WatchListServer_Send_Call) RunAndReturn(run func(*pbre func (_m *ResourceService_WatchListServer) SendHeader(_a0 metadata.MD) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SendHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { r0 = rf(_a0) @@ -197,6 +213,10 @@ func (_c *ResourceService_WatchListServer_SendHeader_Call) RunAndReturn(run func func (_m *ResourceService_WatchListServer) SendMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for SendMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -239,6 +259,10 @@ func (_c *ResourceService_WatchListServer_SendMsg_Call) RunAndReturn(run func(in func (_m *ResourceService_WatchListServer) SetHeader(_a0 metadata.MD) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SetHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { r0 = rf(_a0) diff --git a/grpcmocks/proto-public/pbresource/mock_UnsafeResourceServiceServer.go b/grpcmocks/proto-public/pbresource/mock_UnsafeResourceServiceServer.go index 4327f93134..59e1aef0c7 100644 --- a/grpcmocks/proto-public/pbresource/mock_UnsafeResourceServiceServer.go +++ b/grpcmocks/proto-public/pbresource/mock_UnsafeResourceServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbresource diff --git a/grpcmocks/proto-public/pbresource/mock_isWatchEvent_Event.go b/grpcmocks/proto-public/pbresource/mock_isWatchEvent_Event.go index abefc113f0..1a9acfd529 100644 --- a/grpcmocks/proto-public/pbresource/mock_isWatchEvent_Event.go +++ b/grpcmocks/proto-public/pbresource/mock_isWatchEvent_Event.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbresource diff --git a/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryServiceClient.go b/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryServiceClient.go index f6c5ce3b85..8ec2fca4cc 100644 --- a/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryServiceClient.go +++ b/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbserverdiscovery @@ -36,6 +36,10 @@ func (_m *ServerDiscoveryServiceClient) WatchServers(ctx context.Context, in *pb _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WatchServers") + } + var r0 pbserverdiscovery.ServerDiscoveryService_WatchServersClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbserverdiscovery.WatchServersRequest, ...grpc.CallOption) (pbserverdiscovery.ServerDiscoveryService_WatchServersClient, error)); ok { diff --git a/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryServiceServer.go b/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryServiceServer.go index 44b610f9a9..b61f066e96 100644 --- a/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryServiceServer.go +++ b/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbserverdiscovery @@ -24,6 +24,10 @@ func (_m *ServerDiscoveryServiceServer) EXPECT() *ServerDiscoveryServiceServer_E func (_m *ServerDiscoveryServiceServer) WatchServers(_a0 *pbserverdiscovery.WatchServersRequest, _a1 pbserverdiscovery.ServerDiscoveryService_WatchServersServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for WatchServers") + } + var r0 error if rf, ok := ret.Get(0).(func(*pbserverdiscovery.WatchServersRequest, pbserverdiscovery.ServerDiscoveryService_WatchServersServer) error); ok { r0 = rf(_a0, _a1) diff --git a/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryService_WatchServersClient.go b/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryService_WatchServersClient.go index 9289c84b49..eb397adade 100644 --- a/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryService_WatchServersClient.go +++ b/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryService_WatchServersClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbserverdiscovery @@ -28,6 +28,10 @@ func (_m *ServerDiscoveryService_WatchServersClient) EXPECT() *ServerDiscoverySe func (_m *ServerDiscoveryService_WatchServersClient) CloseSend() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CloseSend") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -69,6 +73,10 @@ func (_c *ServerDiscoveryService_WatchServersClient_CloseSend_Call) RunAndReturn func (_m *ServerDiscoveryService_WatchServersClient) Context() context.Context { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Context") + } + var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -112,6 +120,10 @@ func (_c *ServerDiscoveryService_WatchServersClient_Context_Call) RunAndReturn(r func (_m *ServerDiscoveryService_WatchServersClient) Header() (metadata.MD, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Header") + } + var r0 metadata.MD var r1 error if rf, ok := ret.Get(0).(func() (metadata.MD, error)); ok { @@ -165,6 +177,10 @@ func (_c *ServerDiscoveryService_WatchServersClient_Header_Call) RunAndReturn(ru func (_m *ServerDiscoveryService_WatchServersClient) Recv() (*pbserverdiscovery.WatchServersResponse, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Recv") + } + var r0 *pbserverdiscovery.WatchServersResponse var r1 error if rf, ok := ret.Get(0).(func() (*pbserverdiscovery.WatchServersResponse, error)); ok { @@ -218,6 +234,10 @@ func (_c *ServerDiscoveryService_WatchServersClient_Recv_Call) RunAndReturn(run func (_m *ServerDiscoveryService_WatchServersClient) RecvMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for RecvMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -260,6 +280,10 @@ func (_c *ServerDiscoveryService_WatchServersClient_RecvMsg_Call) RunAndReturn(r func (_m *ServerDiscoveryService_WatchServersClient) SendMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for SendMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -302,6 +326,10 @@ func (_c *ServerDiscoveryService_WatchServersClient_SendMsg_Call) RunAndReturn(r func (_m *ServerDiscoveryService_WatchServersClient) Trailer() metadata.MD { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Trailer") + } + var r0 metadata.MD if rf, ok := ret.Get(0).(func() metadata.MD); ok { r0 = rf() diff --git a/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryService_WatchServersServer.go b/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryService_WatchServersServer.go index b80039ec5b..ea6234ed5d 100644 --- a/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryService_WatchServersServer.go +++ b/grpcmocks/proto-public/pbserverdiscovery/mock_ServerDiscoveryService_WatchServersServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbserverdiscovery @@ -28,6 +28,10 @@ func (_m *ServerDiscoveryService_WatchServersServer) EXPECT() *ServerDiscoverySe func (_m *ServerDiscoveryService_WatchServersServer) Context() context.Context { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Context") + } + var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -71,6 +75,10 @@ func (_c *ServerDiscoveryService_WatchServersServer_Context_Call) RunAndReturn(r func (_m *ServerDiscoveryService_WatchServersServer) RecvMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for RecvMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -113,6 +121,10 @@ func (_c *ServerDiscoveryService_WatchServersServer_RecvMsg_Call) RunAndReturn(r func (_m *ServerDiscoveryService_WatchServersServer) Send(_a0 *pbserverdiscovery.WatchServersResponse) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 error if rf, ok := ret.Get(0).(func(*pbserverdiscovery.WatchServersResponse) error); ok { r0 = rf(_a0) @@ -155,6 +167,10 @@ func (_c *ServerDiscoveryService_WatchServersServer_Send_Call) RunAndReturn(run func (_m *ServerDiscoveryService_WatchServersServer) SendHeader(_a0 metadata.MD) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SendHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { r0 = rf(_a0) @@ -197,6 +213,10 @@ func (_c *ServerDiscoveryService_WatchServersServer_SendHeader_Call) RunAndRetur func (_m *ServerDiscoveryService_WatchServersServer) SendMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for SendMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -239,6 +259,10 @@ func (_c *ServerDiscoveryService_WatchServersServer_SendMsg_Call) RunAndReturn(r func (_m *ServerDiscoveryService_WatchServersServer) SetHeader(_a0 metadata.MD) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SetHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { r0 = rf(_a0) diff --git a/grpcmocks/proto-public/pbserverdiscovery/mock_UnsafeServerDiscoveryServiceServer.go b/grpcmocks/proto-public/pbserverdiscovery/mock_UnsafeServerDiscoveryServiceServer.go index f749949ace..935dbbdbf5 100644 --- a/grpcmocks/proto-public/pbserverdiscovery/mock_UnsafeServerDiscoveryServiceServer.go +++ b/grpcmocks/proto-public/pbserverdiscovery/mock_UnsafeServerDiscoveryServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.37.1. DO NOT EDIT. +// Code generated by mockery v2.41.0. DO NOT EDIT. package mockpbserverdiscovery diff --git a/internal/tools/protoc-gen-consul-rate-limit/main.go b/internal/tools/protoc-gen-consul-rate-limit/main.go index f07cb741cc..fa369d9405 100644 --- a/internal/tools/protoc-gen-consul-rate-limit/main.go +++ b/internal/tools/protoc-gen-consul-rate-limit/main.go @@ -47,6 +47,7 @@ import ( "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/proto" + gengo "google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo" "github.com/hashicorp/consul/proto-public/annotations/ratelimit" ) @@ -102,6 +103,7 @@ func main() { return err } } + plugin.SupportedFeatures = gengo.SupportedFeatures return nil }) }