From 5030657688eba10d618873536e619ef57b525042 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Mon, 6 Nov 2023 13:15:22 -0800 Subject: [PATCH 1/7] stress: Move package under interop --- {stress => interop/stress}/client/main.go | 2 +- {stress => interop/stress}/grpc_testing/metrics.pb.go | 0 {stress => interop/stress}/grpc_testing/metrics.proto | 0 {stress => interop/stress}/grpc_testing/metrics_grpc.pb.go | 0 {stress => interop/stress}/metrics_client/main.go | 2 +- 5 files changed, 2 insertions(+), 2 deletions(-) rename {stress => interop/stress}/client/main.go (99%) rename {stress => interop/stress}/grpc_testing/metrics.pb.go (100%) rename {stress => interop/stress}/grpc_testing/metrics.proto (100%) rename {stress => interop/stress}/grpc_testing/metrics_grpc.pb.go (100%) rename {stress => interop/stress}/metrics_client/main.go (97%) diff --git a/stress/client/main.go b/interop/stress/client/main.go similarity index 99% rename from stress/client/main.go rename to interop/stress/client/main.go index 60bd94e90ac5..ec6fce96dd72 100644 --- a/stress/client/main.go +++ b/interop/stress/client/main.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/testdata" testgrpc "google.golang.org/grpc/interop/grpc_testing" - metricspb "google.golang.org/grpc/stress/grpc_testing" + metricspb "google.golang.org/grpc/interop/stress/grpc_testing" ) var ( diff --git a/stress/grpc_testing/metrics.pb.go b/interop/stress/grpc_testing/metrics.pb.go similarity index 100% rename from stress/grpc_testing/metrics.pb.go rename to interop/stress/grpc_testing/metrics.pb.go diff --git a/stress/grpc_testing/metrics.proto b/interop/stress/grpc_testing/metrics.proto similarity index 100% rename from stress/grpc_testing/metrics.proto rename to interop/stress/grpc_testing/metrics.proto diff --git a/stress/grpc_testing/metrics_grpc.pb.go b/interop/stress/grpc_testing/metrics_grpc.pb.go similarity index 100% rename from stress/grpc_testing/metrics_grpc.pb.go rename to interop/stress/grpc_testing/metrics_grpc.pb.go diff --git a/stress/metrics_client/main.go b/interop/stress/metrics_client/main.go similarity index 97% rename from stress/metrics_client/main.go rename to interop/stress/metrics_client/main.go index 8948f868dbf3..f6e16abddad2 100644 --- a/stress/metrics_client/main.go +++ b/interop/stress/metrics_client/main.go @@ -28,7 +28,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/grpclog" - metricspb "google.golang.org/grpc/stress/grpc_testing" + metricspb "google.golang.org/grpc/interop/stress/grpc_testing" ) var ( From c4942d021b48fcda374b977d597368df2181b8a4 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Mon, 6 Nov 2023 13:20:36 -0800 Subject: [PATCH 2/7] Update package in the metrics proto --- interop/stress/grpc_testing/metrics.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interop/stress/grpc_testing/metrics.proto b/interop/stress/grpc_testing/metrics.proto index 0197d4d70e53..301527e936bc 100644 --- a/interop/stress/grpc_testing/metrics.proto +++ b/interop/stress/grpc_testing/metrics.proto @@ -20,7 +20,7 @@ // service. syntax = "proto3"; -option go_package = "google.golang.org/grpc/stress/grpc_testing"; +option go_package = "google.golang.org/grpc/interop/stress/grpc_testing"; package grpc.testing; From 69042afc428d3627b2a5c34dd3f29ff72c50b0da Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Mon, 6 Nov 2023 14:18:49 -0800 Subject: [PATCH 3/7] Regenerate pg.go files --- interop/stress/grpc_testing/metrics.pb.go | 133 +++++++++--------- .../stress/grpc_testing/metrics_grpc.pb.go | 6 +- 2 files changed, 70 insertions(+), 69 deletions(-) diff --git a/interop/stress/grpc_testing/metrics.pb.go b/interop/stress/grpc_testing/metrics.pb.go index e30eeae322e2..e9da35bf3661 100644 --- a/interop/stress/grpc_testing/metrics.pb.go +++ b/interop/stress/grpc_testing/metrics.pb.go @@ -22,8 +22,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 -// protoc v4.22.0 -// source: stress/grpc_testing/metrics.proto +// protoc v3.21.12 +// source: interop/stress/grpc_testing/metrics.proto package grpc_testing @@ -59,7 +59,7 @@ type GaugeResponse struct { func (x *GaugeResponse) Reset() { *x = GaugeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_stress_grpc_testing_metrics_proto_msgTypes[0] + mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -72,7 +72,7 @@ func (x *GaugeResponse) String() string { func (*GaugeResponse) ProtoMessage() {} func (x *GaugeResponse) ProtoReflect() protoreflect.Message { - mi := &file_stress_grpc_testing_metrics_proto_msgTypes[0] + mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85,7 +85,7 @@ func (x *GaugeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GaugeResponse.ProtoReflect.Descriptor instead. func (*GaugeResponse) Descriptor() ([]byte, []int) { - return file_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{0} + return file_interop_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{0} } func (x *GaugeResponse) GetName() string { @@ -157,7 +157,7 @@ type GaugeRequest struct { func (x *GaugeRequest) Reset() { *x = GaugeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_stress_grpc_testing_metrics_proto_msgTypes[1] + mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -170,7 +170,7 @@ func (x *GaugeRequest) String() string { func (*GaugeRequest) ProtoMessage() {} func (x *GaugeRequest) ProtoReflect() protoreflect.Message { - mi := &file_stress_grpc_testing_metrics_proto_msgTypes[1] + mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -183,7 +183,7 @@ func (x *GaugeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GaugeRequest.ProtoReflect.Descriptor instead. func (*GaugeRequest) Descriptor() ([]byte, []int) { - return file_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{1} + return file_interop_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{1} } func (x *GaugeRequest) GetName() string { @@ -202,7 +202,7 @@ type EmptyMessage struct { func (x *EmptyMessage) Reset() { *x = EmptyMessage{} if protoimpl.UnsafeEnabled { - mi := &file_stress_grpc_testing_metrics_proto_msgTypes[2] + mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -215,7 +215,7 @@ func (x *EmptyMessage) String() string { func (*EmptyMessage) ProtoMessage() {} func (x *EmptyMessage) ProtoReflect() protoreflect.Message { - mi := &file_stress_grpc_testing_metrics_proto_msgTypes[2] + mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -228,63 +228,64 @@ func (x *EmptyMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyMessage.ProtoReflect.Descriptor instead. func (*EmptyMessage) Descriptor() ([]byte, []int) { - return file_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{2} + return file_interop_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{2} } -var File_stress_grpc_testing_metrics_proto protoreflect.FileDescriptor - -var file_stress_grpc_testing_metrics_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x22, 0x97, 0x01, 0x0a, 0x0d, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x6c, - 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, - 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, - 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x22, 0x0a, 0x0c, 0x47, - 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, - 0xa0, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x47, 0x61, 0x75, 0x67, - 0x65, 0x73, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1b, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61, - 0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x43, 0x0a, - 0x08, 0x47, 0x65, 0x74, 0x47, 0x61, 0x75, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, - 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x72, +var File_interop_stress_grpc_testing_metrics_proto protoreflect.FileDescriptor + +var file_interop_stress_grpc_testing_metrics_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6f, 0x70, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, + 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x97, 0x01, 0x0a, 0x0d, 0x47, 0x61, + 0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1f, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x22, 0x0a, 0x0c, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0xa0, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, + 0x74, 0x41, 0x6c, 0x6c, 0x47, 0x61, 0x75, 0x67, 0x65, 0x73, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x61, 0x75, 0x67, + 0x65, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61, 0x75, + 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6f, 0x70, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_stress_grpc_testing_metrics_proto_rawDescOnce sync.Once - file_stress_grpc_testing_metrics_proto_rawDescData = file_stress_grpc_testing_metrics_proto_rawDesc + file_interop_stress_grpc_testing_metrics_proto_rawDescOnce sync.Once + file_interop_stress_grpc_testing_metrics_proto_rawDescData = file_interop_stress_grpc_testing_metrics_proto_rawDesc ) -func file_stress_grpc_testing_metrics_proto_rawDescGZIP() []byte { - file_stress_grpc_testing_metrics_proto_rawDescOnce.Do(func() { - file_stress_grpc_testing_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_stress_grpc_testing_metrics_proto_rawDescData) +func file_interop_stress_grpc_testing_metrics_proto_rawDescGZIP() []byte { + file_interop_stress_grpc_testing_metrics_proto_rawDescOnce.Do(func() { + file_interop_stress_grpc_testing_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_interop_stress_grpc_testing_metrics_proto_rawDescData) }) - return file_stress_grpc_testing_metrics_proto_rawDescData + return file_interop_stress_grpc_testing_metrics_proto_rawDescData } -var file_stress_grpc_testing_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_stress_grpc_testing_metrics_proto_goTypes = []interface{}{ +var file_interop_stress_grpc_testing_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_interop_stress_grpc_testing_metrics_proto_goTypes = []interface{}{ (*GaugeResponse)(nil), // 0: grpc.testing.GaugeResponse (*GaugeRequest)(nil), // 1: grpc.testing.GaugeRequest (*EmptyMessage)(nil), // 2: grpc.testing.EmptyMessage } -var file_stress_grpc_testing_metrics_proto_depIdxs = []int32{ +var file_interop_stress_grpc_testing_metrics_proto_depIdxs = []int32{ 2, // 0: grpc.testing.MetricsService.GetAllGauges:input_type -> grpc.testing.EmptyMessage 1, // 1: grpc.testing.MetricsService.GetGauge:input_type -> grpc.testing.GaugeRequest 0, // 2: grpc.testing.MetricsService.GetAllGauges:output_type -> grpc.testing.GaugeResponse @@ -296,13 +297,13 @@ var file_stress_grpc_testing_metrics_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_stress_grpc_testing_metrics_proto_init() } -func file_stress_grpc_testing_metrics_proto_init() { - if File_stress_grpc_testing_metrics_proto != nil { +func init() { file_interop_stress_grpc_testing_metrics_proto_init() } +func file_interop_stress_grpc_testing_metrics_proto_init() { + if File_interop_stress_grpc_testing_metrics_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_stress_grpc_testing_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_interop_stress_grpc_testing_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GaugeResponse); i { case 0: return &v.state @@ -314,7 +315,7 @@ func file_stress_grpc_testing_metrics_proto_init() { return nil } } - file_stress_grpc_testing_metrics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_interop_stress_grpc_testing_metrics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GaugeRequest); i { case 0: return &v.state @@ -326,7 +327,7 @@ func file_stress_grpc_testing_metrics_proto_init() { return nil } } - file_stress_grpc_testing_metrics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_interop_stress_grpc_testing_metrics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EmptyMessage); i { case 0: return &v.state @@ -339,7 +340,7 @@ func file_stress_grpc_testing_metrics_proto_init() { } } } - file_stress_grpc_testing_metrics_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_interop_stress_grpc_testing_metrics_proto_msgTypes[0].OneofWrappers = []interface{}{ (*GaugeResponse_LongValue)(nil), (*GaugeResponse_DoubleValue)(nil), (*GaugeResponse_StringValue)(nil), @@ -348,18 +349,18 @@ func file_stress_grpc_testing_metrics_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stress_grpc_testing_metrics_proto_rawDesc, + RawDescriptor: file_interop_stress_grpc_testing_metrics_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_stress_grpc_testing_metrics_proto_goTypes, - DependencyIndexes: file_stress_grpc_testing_metrics_proto_depIdxs, - MessageInfos: file_stress_grpc_testing_metrics_proto_msgTypes, + GoTypes: file_interop_stress_grpc_testing_metrics_proto_goTypes, + DependencyIndexes: file_interop_stress_grpc_testing_metrics_proto_depIdxs, + MessageInfos: file_interop_stress_grpc_testing_metrics_proto_msgTypes, }.Build() - File_stress_grpc_testing_metrics_proto = out.File - file_stress_grpc_testing_metrics_proto_rawDesc = nil - file_stress_grpc_testing_metrics_proto_goTypes = nil - file_stress_grpc_testing_metrics_proto_depIdxs = nil + File_interop_stress_grpc_testing_metrics_proto = out.File + file_interop_stress_grpc_testing_metrics_proto_rawDesc = nil + file_interop_stress_grpc_testing_metrics_proto_goTypes = nil + file_interop_stress_grpc_testing_metrics_proto_depIdxs = nil } diff --git a/interop/stress/grpc_testing/metrics_grpc.pb.go b/interop/stress/grpc_testing/metrics_grpc.pb.go index 4e2f985bdf16..2ffd7980162d 100644 --- a/interop/stress/grpc_testing/metrics_grpc.pb.go +++ b/interop/stress/grpc_testing/metrics_grpc.pb.go @@ -22,8 +22,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.22.0 -// source: stress/grpc_testing/metrics.proto +// - protoc v3.21.12 +// source: interop/stress/grpc_testing/metrics.proto package grpc_testing @@ -197,5 +197,5 @@ var MetricsService_ServiceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, - Metadata: "stress/grpc_testing/metrics.proto", + Metadata: "interop/stress/grpc_testing/metrics.proto", } From a20146215febcee28853234c7663e460b827a682 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Mon, 6 Nov 2023 14:36:52 -0800 Subject: [PATCH 4/7] Use protoc 22.0 --- interop/stress/grpc_testing/metrics.pb.go | 2 +- interop/stress/grpc_testing/metrics_grpc.pb.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interop/stress/grpc_testing/metrics.pb.go b/interop/stress/grpc_testing/metrics.pb.go index e9da35bf3661..a5aecfab6587 100644 --- a/interop/stress/grpc_testing/metrics.pb.go +++ b/interop/stress/grpc_testing/metrics.pb.go @@ -22,7 +22,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 -// protoc v3.21.12 +// protoc v4.22.0 // source: interop/stress/grpc_testing/metrics.proto package grpc_testing diff --git a/interop/stress/grpc_testing/metrics_grpc.pb.go b/interop/stress/grpc_testing/metrics_grpc.pb.go index 2ffd7980162d..10526a4f9796 100644 --- a/interop/stress/grpc_testing/metrics_grpc.pb.go +++ b/interop/stress/grpc_testing/metrics_grpc.pb.go @@ -22,7 +22,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v3.21.12 +// - protoc v4.22.0 // source: interop/stress/grpc_testing/metrics.proto package grpc_testing From 19422f5db8fa78f57e9d33ebd6be2536decddb7b Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Mon, 6 Nov 2023 14:37:12 -0800 Subject: [PATCH 5/7] Update exemption for interop/stress --- vet.sh | 150 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 79 insertions(+), 71 deletions(-) diff --git a/vet.sh b/vet.sh index bb480f1f9cca..6db681ea82ad 100755 --- a/vet.sh +++ b/vet.sh @@ -1,22 +1,22 @@ #!/bin/bash -set -ex # Exit on error; debugging enabled. -set -o pipefail # Fail a pipe if any sub-command fails. +set -ex # Exit on error; debugging enabled. +set -o pipefail # Fail a pipe if any sub-command fails. # not makes sure the command passed to it does not exit with a return code of 0. not() { - # This is required instead of the earlier (! $COMMAND) because subshells and - # pipefail don't work the same on Darwin as in Linux. - ! "$@" + # This is required instead of the earlier (! $COMMAND) because subshells and + # pipefail don't work the same on Darwin as in Linux. + ! "$@" } die() { - echo "$@" >&2 - exit 1 + echo "$@" >&2 + exit 1 } fail_on_output() { - tee /dev/stderr | not read + tee /dev/stderr | not read } # Check to make sure it's safe to modify the user's git repo. @@ -24,7 +24,7 @@ git status --porcelain | fail_on_output # Undo any edits made by this script. cleanup() { - git reset --hard HEAD + git reset --hard HEAD } trap cleanup EXIT @@ -32,40 +32,44 @@ PATH="${HOME}/go/bin:${GOROOT}/bin:${PATH}" go version if [[ "$1" = "-install" ]]; then - # Install the pinned versions as defined in module tools. - pushd ./test/tools - go install \ - golang.org/x/lint/golint \ - golang.org/x/tools/cmd/goimports \ - honnef.co/go/tools/cmd/staticcheck \ - github.com/client9/misspell/cmd/misspell - popd - if [[ -z "${VET_SKIP_PROTO}" ]]; then - if [[ "${GITHUB_ACTIONS}" = "true" ]]; then - PROTOBUF_VERSION=22.0 # a.k.a v4.22.0 in pb.go files. - PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip - pushd /home/runner/go - wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME} - unzip ${PROTOC_FILENAME} - bin/protoc --version - popd - elif not which protoc > /dev/null; then - die "Please install protoc into your path" - fi - fi - exit 0 + # Install the pinned versions as defined in module tools. + pushd ./test/tools + go install \ + golang.org/x/lint/golint \ + golang.org/x/tools/cmd/goimports \ + honnef.co/go/tools/cmd/staticcheck \ + github.com/client9/misspell/cmd/misspell + popd + if [[ -z "${VET_SKIP_PROTO}" ]]; then + if [[ "${GITHUB_ACTIONS}" = "true" ]]; then + PROTOBUF_VERSION=22.0 # a.k.a v4.22.0 in pb.go files. + PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip + pushd /home/runner/go + wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME} + unzip ${PROTOC_FILENAME} + bin/protoc --version + popd + elif not which protoc >/dev/null; then + die "Please install protoc into your path" + fi + fi + exit 0 elif [[ "$#" -ne 0 ]]; then - die "Unknown argument(s): $*" + die "Unknown argument(s): $*" fi # - Check that generated proto files are up to date. if [[ -z "${VET_SKIP_PROTO}" ]]; then - make proto && git status --porcelain 2>&1 | fail_on_output || \ - (git status; git --no-pager diff; exit 1) + make proto && git status --porcelain 2>&1 | fail_on_output || + ( + git status + git --no-pager diff + exit 1 + ) fi if [[ -n "${VET_ONLY_PROTO}" ]]; then - exit 0 + exit 0 fi # - Ensure all source files contain a copyright message. @@ -82,7 +86,7 @@ not git grep -l 'x/net/context' -- "*.go" # - Do not import math/rand for real library code. Use internal/grpcrand for # thread safety. -git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^stress\|grpcrand\|^benchmark\|wrr_test' +git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^interop/stress\|grpcrand\|^benchmark\|wrr_test' # - Do not use "interface{}"; use "any" instead. git grep -l 'interface{}' -- "*.go" 2>&1 | not grep -v '\.pb\.go\|protoc-gen-go-grpc' @@ -94,7 +98,7 @@ git grep -l -e 'grpclog.I' --or -e 'grpclog.W' --or -e 'grpclog.E' --or -e 'grpc not git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go" # - Ensure all usages of grpc_testing package are renamed when importing. -not git grep "\(import \|^\s*\)\"google.golang.org/grpc/interop/grpc_testing" -- "*.go" +not git grep "\(import \|^\s*\)\"google.golang.org/grpc/interop/grpc_testing" -- "*.go" # - Ensure all xds proto imports are renamed to *pb or *grpc. git grep '"github.com/envoyproxy/go-control-plane/envoy' -- '*.go' ':(exclude)*.pb.go' | not grep -v 'pb "\|grpc "' @@ -105,17 +109,21 @@ misspell -error . # go mod tidy. # Perform these checks on each module inside gRPC. for MOD_FILE in $(find . -name 'go.mod'); do - MOD_DIR=$(dirname ${MOD_FILE}) - pushd ${MOD_DIR} - go vet -all ./... | fail_on_output - gofmt -s -d -l . 2>&1 | fail_on_output - goimports -l . 2>&1 | not grep -vE "\.pb\.go" - golint ./... 2>&1 | not grep -vE "/grpc_testing_not_regenerate/.*\.pb\.go:" - - go mod tidy -compat=1.19 - git status --porcelain 2>&1 | fail_on_output || \ - (git status; git --no-pager diff; exit 1) - popd + MOD_DIR=$(dirname ${MOD_FILE}) + pushd ${MOD_DIR} + go vet -all ./... | fail_on_output + gofmt -s -d -l . 2>&1 | fail_on_output + goimports -l . 2>&1 | not grep -vE "\.pb\.go" + golint ./... 2>&1 | not grep -vE "/grpc_testing_not_regenerate/.*\.pb\.go:" + + go mod tidy -compat=1.19 + git status --porcelain 2>&1 | fail_on_output || + ( + git status + git --no-pager diff + exit 1 + ) + popd done # - Collection of static analysis checks @@ -124,7 +132,7 @@ done # plugins. # TODO(dfawley): enable ST1019 (duplicate imports) but allow for protobufs. SC_OUT="$(mktemp)" -staticcheck -go 1.19 -checks 'inherit,-ST1015,-ST1019,-SA1019' ./... > "${SC_OUT}" || true +staticcheck -go 1.19 -checks 'inherit,-ST1015,-ST1019,-SA1019' ./... >"${SC_OUT}" || true # Error if anything other than deprecation warnings are printed. not grep -v "is deprecated:.*SA1019" "${SC_OUT}" # Only ignore the following deprecated types/fields/functions. @@ -180,32 +188,32 @@ xxx_messageInfo_ # - special golint on package comments. lint_package_comment_per_package() { - # Number of files in this go package. - fileCount=$(go list -f '{{len .GoFiles}}' $1) - if [ ${fileCount} -eq 0 ]; then - return 0 - fi - # Number of package errors generated by golint. - lintPackageCommentErrorsCount=$(golint --min_confidence 0 $1 | grep -c "should have a package comment") - # golint complains about every file that's missing the package comment. If the - # number of files for this package is greater than the number of errors, there's - # at least one file with package comment, good. Otherwise, fail. - if [ ${fileCount} -le ${lintPackageCommentErrorsCount} ]; then - echo "Package $1 (with ${fileCount} files) is missing package comment" - return 1 - fi + # Number of files in this go package. + fileCount=$(go list -f '{{len .GoFiles}}' $1) + if [ ${fileCount} -eq 0 ]; then + return 0 + fi + # Number of package errors generated by golint. + lintPackageCommentErrorsCount=$(golint --min_confidence 0 $1 | grep -c "should have a package comment") + # golint complains about every file that's missing the package comment. If the + # number of files for this package is greater than the number of errors, there's + # at least one file with package comment, good. Otherwise, fail. + if [ ${fileCount} -le ${lintPackageCommentErrorsCount} ]; then + echo "Package $1 (with ${fileCount} files) is missing package comment" + return 1 + fi } lint_package_comment() { - set +ex + set +ex - count=0 - for i in $(go list ./...); do - lint_package_comment_per_package "$i" - ((count += $?)) - done + count=0 + for i in $(go list ./...); do + lint_package_comment_per_package "$i" + ((count += $?)) + done - set -ex - return $count + set -ex + return $count } lint_package_comment From 5255b67cb8e7ebefdc90410b965065a62e7ba4cc Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Mon, 6 Nov 2023 15:11:03 -0800 Subject: [PATCH 6/7] Revert bad tabs from vet.sh --- vet.sh | 150 +++++++++++++++++++++++++++------------------------------ 1 file changed, 71 insertions(+), 79 deletions(-) diff --git a/vet.sh b/vet.sh index 6db681ea82ad..bb480f1f9cca 100755 --- a/vet.sh +++ b/vet.sh @@ -1,22 +1,22 @@ #!/bin/bash -set -ex # Exit on error; debugging enabled. -set -o pipefail # Fail a pipe if any sub-command fails. +set -ex # Exit on error; debugging enabled. +set -o pipefail # Fail a pipe if any sub-command fails. # not makes sure the command passed to it does not exit with a return code of 0. not() { - # This is required instead of the earlier (! $COMMAND) because subshells and - # pipefail don't work the same on Darwin as in Linux. - ! "$@" + # This is required instead of the earlier (! $COMMAND) because subshells and + # pipefail don't work the same on Darwin as in Linux. + ! "$@" } die() { - echo "$@" >&2 - exit 1 + echo "$@" >&2 + exit 1 } fail_on_output() { - tee /dev/stderr | not read + tee /dev/stderr | not read } # Check to make sure it's safe to modify the user's git repo. @@ -24,7 +24,7 @@ git status --porcelain | fail_on_output # Undo any edits made by this script. cleanup() { - git reset --hard HEAD + git reset --hard HEAD } trap cleanup EXIT @@ -32,44 +32,40 @@ PATH="${HOME}/go/bin:${GOROOT}/bin:${PATH}" go version if [[ "$1" = "-install" ]]; then - # Install the pinned versions as defined in module tools. - pushd ./test/tools - go install \ - golang.org/x/lint/golint \ - golang.org/x/tools/cmd/goimports \ - honnef.co/go/tools/cmd/staticcheck \ - github.com/client9/misspell/cmd/misspell - popd - if [[ -z "${VET_SKIP_PROTO}" ]]; then - if [[ "${GITHUB_ACTIONS}" = "true" ]]; then - PROTOBUF_VERSION=22.0 # a.k.a v4.22.0 in pb.go files. - PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip - pushd /home/runner/go - wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME} - unzip ${PROTOC_FILENAME} - bin/protoc --version - popd - elif not which protoc >/dev/null; then - die "Please install protoc into your path" - fi - fi - exit 0 + # Install the pinned versions as defined in module tools. + pushd ./test/tools + go install \ + golang.org/x/lint/golint \ + golang.org/x/tools/cmd/goimports \ + honnef.co/go/tools/cmd/staticcheck \ + github.com/client9/misspell/cmd/misspell + popd + if [[ -z "${VET_SKIP_PROTO}" ]]; then + if [[ "${GITHUB_ACTIONS}" = "true" ]]; then + PROTOBUF_VERSION=22.0 # a.k.a v4.22.0 in pb.go files. + PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip + pushd /home/runner/go + wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME} + unzip ${PROTOC_FILENAME} + bin/protoc --version + popd + elif not which protoc > /dev/null; then + die "Please install protoc into your path" + fi + fi + exit 0 elif [[ "$#" -ne 0 ]]; then - die "Unknown argument(s): $*" + die "Unknown argument(s): $*" fi # - Check that generated proto files are up to date. if [[ -z "${VET_SKIP_PROTO}" ]]; then - make proto && git status --porcelain 2>&1 | fail_on_output || - ( - git status - git --no-pager diff - exit 1 - ) + make proto && git status --porcelain 2>&1 | fail_on_output || \ + (git status; git --no-pager diff; exit 1) fi if [[ -n "${VET_ONLY_PROTO}" ]]; then - exit 0 + exit 0 fi # - Ensure all source files contain a copyright message. @@ -86,7 +82,7 @@ not git grep -l 'x/net/context' -- "*.go" # - Do not import math/rand for real library code. Use internal/grpcrand for # thread safety. -git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^interop/stress\|grpcrand\|^benchmark\|wrr_test' +git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^stress\|grpcrand\|^benchmark\|wrr_test' # - Do not use "interface{}"; use "any" instead. git grep -l 'interface{}' -- "*.go" 2>&1 | not grep -v '\.pb\.go\|protoc-gen-go-grpc' @@ -98,7 +94,7 @@ git grep -l -e 'grpclog.I' --or -e 'grpclog.W' --or -e 'grpclog.E' --or -e 'grpc not git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go" # - Ensure all usages of grpc_testing package are renamed when importing. -not git grep "\(import \|^\s*\)\"google.golang.org/grpc/interop/grpc_testing" -- "*.go" +not git grep "\(import \|^\s*\)\"google.golang.org/grpc/interop/grpc_testing" -- "*.go" # - Ensure all xds proto imports are renamed to *pb or *grpc. git grep '"github.com/envoyproxy/go-control-plane/envoy' -- '*.go' ':(exclude)*.pb.go' | not grep -v 'pb "\|grpc "' @@ -109,21 +105,17 @@ misspell -error . # go mod tidy. # Perform these checks on each module inside gRPC. for MOD_FILE in $(find . -name 'go.mod'); do - MOD_DIR=$(dirname ${MOD_FILE}) - pushd ${MOD_DIR} - go vet -all ./... | fail_on_output - gofmt -s -d -l . 2>&1 | fail_on_output - goimports -l . 2>&1 | not grep -vE "\.pb\.go" - golint ./... 2>&1 | not grep -vE "/grpc_testing_not_regenerate/.*\.pb\.go:" - - go mod tidy -compat=1.19 - git status --porcelain 2>&1 | fail_on_output || - ( - git status - git --no-pager diff - exit 1 - ) - popd + MOD_DIR=$(dirname ${MOD_FILE}) + pushd ${MOD_DIR} + go vet -all ./... | fail_on_output + gofmt -s -d -l . 2>&1 | fail_on_output + goimports -l . 2>&1 | not grep -vE "\.pb\.go" + golint ./... 2>&1 | not grep -vE "/grpc_testing_not_regenerate/.*\.pb\.go:" + + go mod tidy -compat=1.19 + git status --porcelain 2>&1 | fail_on_output || \ + (git status; git --no-pager diff; exit 1) + popd done # - Collection of static analysis checks @@ -132,7 +124,7 @@ done # plugins. # TODO(dfawley): enable ST1019 (duplicate imports) but allow for protobufs. SC_OUT="$(mktemp)" -staticcheck -go 1.19 -checks 'inherit,-ST1015,-ST1019,-SA1019' ./... >"${SC_OUT}" || true +staticcheck -go 1.19 -checks 'inherit,-ST1015,-ST1019,-SA1019' ./... > "${SC_OUT}" || true # Error if anything other than deprecation warnings are printed. not grep -v "is deprecated:.*SA1019" "${SC_OUT}" # Only ignore the following deprecated types/fields/functions. @@ -188,32 +180,32 @@ xxx_messageInfo_ # - special golint on package comments. lint_package_comment_per_package() { - # Number of files in this go package. - fileCount=$(go list -f '{{len .GoFiles}}' $1) - if [ ${fileCount} -eq 0 ]; then - return 0 - fi - # Number of package errors generated by golint. - lintPackageCommentErrorsCount=$(golint --min_confidence 0 $1 | grep -c "should have a package comment") - # golint complains about every file that's missing the package comment. If the - # number of files for this package is greater than the number of errors, there's - # at least one file with package comment, good. Otherwise, fail. - if [ ${fileCount} -le ${lintPackageCommentErrorsCount} ]; then - echo "Package $1 (with ${fileCount} files) is missing package comment" - return 1 - fi + # Number of files in this go package. + fileCount=$(go list -f '{{len .GoFiles}}' $1) + if [ ${fileCount} -eq 0 ]; then + return 0 + fi + # Number of package errors generated by golint. + lintPackageCommentErrorsCount=$(golint --min_confidence 0 $1 | grep -c "should have a package comment") + # golint complains about every file that's missing the package comment. If the + # number of files for this package is greater than the number of errors, there's + # at least one file with package comment, good. Otherwise, fail. + if [ ${fileCount} -le ${lintPackageCommentErrorsCount} ]; then + echo "Package $1 (with ${fileCount} files) is missing package comment" + return 1 + fi } lint_package_comment() { - set +ex + set +ex - count=0 - for i in $(go list ./...); do - lint_package_comment_per_package "$i" - ((count += $?)) - done + count=0 + for i in $(go list ./...); do + lint_package_comment_per_package "$i" + ((count += $?)) + done - set -ex - return $count + set -ex + return $count } lint_package_comment From 68f0f50c9ef5a9372453100a86ef15ea65c48288 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Mon, 6 Nov 2023 15:17:46 -0800 Subject: [PATCH 7/7] Gentler edit of vet.sh --- vet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vet.sh b/vet.sh index bb480f1f9cca..ee29f4381275 100755 --- a/vet.sh +++ b/vet.sh @@ -82,7 +82,7 @@ not git grep -l 'x/net/context' -- "*.go" # - Do not import math/rand for real library code. Use internal/grpcrand for # thread safety. -git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^stress\|grpcrand\|^benchmark\|wrr_test' +git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^interop/stress\|grpcrand\|^benchmark\|wrr_test' # - Do not use "interface{}"; use "any" instead. git grep -l 'interface{}' -- "*.go" 2>&1 | not grep -v '\.pb\.go\|protoc-gen-go-grpc'