From 7bb497f78432890caa760b51fcfc077498b1fee2 Mon Sep 17 00:00:00 2001 From: Easwar Swaminathan Date: Wed, 27 Jan 2021 16:36:06 -0800 Subject: [PATCH] grpc: Update protobuf regenrate script (#4177) - Pull in protobuf repo since one of our protos pulls in duration.proto - Update grpc_testing/messages.pb.go to pull in a recent change --- interop/grpc_testing/messages.pb.go | 4 ++-- regenerate.sh | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/interop/grpc_testing/messages.pb.go b/interop/grpc_testing/messages.pb.go index 6ca348b6201..f956a5ad771 100644 --- a/interop/grpc_testing/messages.pb.go +++ b/interop/grpc_testing/messages.pb.go @@ -1185,8 +1185,8 @@ type LoadBalancerAccumulatedStatsResponse struct { // // Deprecated: Do not use. NumRpcsFailedByMethod map[string]int32 `protobuf:"bytes,3,rep,name=num_rpcs_failed_by_method,json=numRpcsFailedByMethod,proto3" json:"num_rpcs_failed_by_method,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // Per-method RPC statistics. The key is the full method path; i.e. - // "/proto.package.ServiceName/MethodName". + // Per-method RPC statistics. The key is the RpcType in string form; e.g. + // 'EMPTY_CALL' or 'UNARY_CALL' StatsPerMethod map[string]*LoadBalancerAccumulatedStatsResponse_MethodStats `protobuf:"bytes,4,rep,name=stats_per_method,json=statsPerMethod,proto3" json:"stats_per_method,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } diff --git a/regenerate.sh b/regenerate.sh index ed52187df66..fc6725b89f8 100755 --- a/regenerate.sh +++ b/regenerate.sh @@ -40,6 +40,9 @@ echo "go install cmd/protoc-gen-go-grpc" echo "git clone https://github.com/grpc/grpc-proto" git clone --quiet https://github.com/grpc/grpc-proto ${WORKDIR}/grpc-proto +echo "git clone https://github.com/protocolbuffers/protobuf" +git clone --quiet https://github.com/protocolbuffers/protobuf ${WORKDIR}/protobuf + # Pull in code.proto as a proto dependency mkdir -p ${WORKDIR}/googleapis/google/rpc echo "curl https://raw.githubusercontent.com/googleapis/googleapis/master/google/rpc/code.proto" @@ -87,6 +90,7 @@ for src in ${SOURCES[@]}; do -I"." \ -I${WORKDIR}/grpc-proto \ -I${WORKDIR}/googleapis \ + -I${WORKDIR}/protobuf/src \ -I${WORKDIR}/istio \ ${src} done @@ -97,6 +101,7 @@ for src in ${LEGACY_SOURCES[@]}; do -I"." \ -I${WORKDIR}/grpc-proto \ -I${WORKDIR}/googleapis \ + -I${WORKDIR}/protobuf/src \ -I${WORKDIR}/istio \ ${src} done