From a427d54454b0f85a85340846aead5f8f30bd4d24 Mon Sep 17 00:00:00 2001 From: Sami Hiltunen Date: Wed, 5 Jul 2023 16:28:10 +0300 Subject: [PATCH 1/2] Add missing operation type annotations Some RPCs in Gitaly are missing operation type and scope annotations. These are needed to handle starting transactions for RPCs in a general manner. The RPCs were missing the annotations as they are intercepted by Praefect and the annotations were previously only used by Praefect for deciding how to proxy the requests. As Gitaly will soon need the annotations itself, this commit adds back the missing annotations. The ServerService was previously using a Server scope that doesn't exist these days. We're annotating the RPCs as storage scoped even though they're not really storage scoped. The current use cases do not differentiate between server and storage scoped RPCs: 1. Gitaly's transaction code only needs to know whether or not the RPC is repository scoped or not. 2. Praefect implements the ServerService directly so it wouldn't differentiate either based on storage vs server scope. We'll do the smaller change for now to annotate the RPCs even if the scope is slightly wrong. We can later move from a multivalued scope field to a boolean that says whether the RPC is repository scoped or not. TransactionService and PraefectInfoService service remain without annotations. These are only implemented by Praefect and thus Gitaly doesn't need annotations for them. --- proto/go/gitalypb/repository.pb.go | 38 ++++++++++++------------ proto/go/gitalypb/server.pb.go | 46 ++++++++++++++++-------------- proto/repository.proto | 5 +++- proto/server.proto | 30 +++++++++++++++---- 4 files changed, 71 insertions(+), 48 deletions(-) diff --git a/proto/go/gitalypb/repository.pb.go b/proto/go/gitalypb/repository.pb.go index f1eda86d45..9d561f9dc0 100644 --- a/proto/go/gitalypb/repository.pb.go +++ b/proto/go/gitalypb/repository.pb.go @@ -5980,7 +5980,7 @@ var file_repository_proto_rawDesc = []byte{ 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa2, 0x20, 0x0a, 0x11, 0x52, 0x65, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa6, 0x20, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5d, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x70, 0x6f, @@ -6222,27 +6222,27 @@ var file_repository_proto_rawDesc = []byte{ 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x09, 0xfa, 0x97, 0x28, 0x02, 0x08, - 0x02, 0x88, 0x02, 0x01, 0x12, 0x46, 0x0a, 0x09, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, + 0x02, 0x88, 0x02, 0x01, 0x12, 0x4a, 0x0a, 0x09, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0x80, 0x98, 0x28, 0x01, 0x12, 0x5d, 0x0a, 0x10, - 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x12, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x12, 0x60, 0x0a, 0x11, 0x52, - 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x12, 0x20, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x42, 0x34, 0x5a, - 0x32, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x6c, - 0x61, 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2f, 0x76, 0x31, - 0x36, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, - 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xfa, 0x97, 0x28, 0x04, 0x08, 0x01, 0x10, 0x02, + 0x12, 0x5d, 0x0a, 0x10, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x42, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x12, + 0x60, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x12, 0x20, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, + 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, + 0x01, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, + 0x79, 0x2f, 0x76, 0x31, 0x36, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, + 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/go/gitalypb/server.pb.go b/proto/go/gitalypb/server.pb.go index 263cce2d5c..a1c56caa3e 100644 --- a/proto/go/gitalypb/server.pb.go +++ b/proto/go/gitalypb/server.pb.go @@ -853,31 +853,33 @@ var file_server_proto_rawDesc = []byte{ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x32, 0xc4, 0x02, 0x0a, 0x0d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x53, 0x65, + 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x32, 0xe6, 0x02, 0x0a, 0x0d, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4f, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, - 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x12, - 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x79, - 0x6e, 0x63, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x69, - 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x65, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, - 0x69, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x69, 0x74, - 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x61, - 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x04, 0xf0, 0x97, 0x28, 0x01, 0x42, - 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, - 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2f, - 0x76, 0x31, 0x36, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x69, 0x74, - 0x61, 0x6c, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x08, 0xfa, 0x97, 0x28, 0x04, 0x08, 0x02, 0x10, 0x02, 0x12, 0x59, 0x0a, 0x0e, 0x44, 0x69, 0x73, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x69, + 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x69, 0x74, + 0x61, 0x6c, 0x79, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xfa, 0x97, 0x28, 0x04, + 0x08, 0x02, 0x10, 0x02, 0x12, 0x50, 0x0a, 0x0b, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x79, 0x6e, + 0x63, 0x65, 0x64, 0x12, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x6c, 0x6f, + 0x63, 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x79, + 0x6e, 0x63, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xfa, 0x97, + 0x28, 0x04, 0x08, 0x02, 0x10, 0x02, 0x12, 0x59, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, + 0x65, 0x73, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, + 0x79, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, + 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xfa, 0x97, 0x28, 0x04, 0x08, 0x02, 0x10, + 0x02, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, + 0x79, 0x2f, 0x76, 0x31, 0x36, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, + 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/repository.proto b/proto/repository.proto index 45cf28c705..565d70cb90 100644 --- a/proto/repository.proto +++ b/proto/repository.proto @@ -369,7 +369,10 @@ service RepositoryService { // RemoveAll deletes all repositories on a specified storage. rpc RemoveAll(RemoveAllRequest) returns (RemoveAllResponse) { - option (intercepted_method) = true; + option (op_type) = { + op: MUTATOR + scope_level: STORAGE + }; } // BackupRepository creates a full backup streamed directly to diff --git a/proto/server.proto b/proto/server.proto index 9e4953b061..e6f139245f 100644 --- a/proto/server.proto +++ b/proto/server.proto @@ -9,20 +9,38 @@ option go_package = "gitlab.com/gitlab-org/gitaly/v16/proto/go/gitalypb"; // ServerService is a service that provides information about a Gitaly server. service ServerService { - option (intercepted) = true; - // This comment is left unintentionally blank. - rpc ServerInfo(ServerInfoRequest) returns (ServerInfoResponse); + rpc ServerInfo(ServerInfoRequest) returns (ServerInfoResponse) { + option (op_type) = { + op: ACCESSOR + scope_level: STORAGE + }; + } // This comment is left unintentionally blank. - rpc DiskStatistics(DiskStatisticsRequest) returns (DiskStatisticsResponse); + rpc DiskStatistics(DiskStatisticsRequest) returns (DiskStatisticsResponse) { + option (op_type) = { + op: ACCESSOR + scope_level: STORAGE + }; + } // ClockSynced checks if machine clock is synced // (the offset is less that the one passed in the request). - rpc ClockSynced(ClockSyncedRequest) returns (ClockSyncedResponse); + rpc ClockSynced(ClockSyncedRequest) returns (ClockSyncedResponse) { + option (op_type) = { + op: ACCESSOR + scope_level: STORAGE + }; + } // ReadinessCheck runs the set of the checks to make sure service is in operational state. - rpc ReadinessCheck(ReadinessCheckRequest) returns (ReadinessCheckResponse); + rpc ReadinessCheck(ReadinessCheckRequest) returns (ReadinessCheckResponse) { + option (op_type) = { + op: ACCESSOR + scope_level: STORAGE + }; + } } // This comment is left unintentionally blank. -- GitLab From caa3c464e6d2a011c70ebd419dc5aa532cda94b9 Mon Sep 17 00:00:00 2001 From: Sami Hiltunen Date: Wed, 5 Jul 2023 16:53:46 +0300 Subject: [PATCH 2/2] Remove intercepted_method option The `intercepted_method` option was used to mark a method as being handled by Praefect. Since the operation type and scope annotations were mostly for Praefect's proxy, marking a method as intecepted allowed for dropping the annotations as they were not needed. As we've now annotated again the methods that had the option set, let's remove the option as it is no longer needed. --- .../protoregistry/protoregistry_test.go | 4 - internal/protoutil/extension.go | 7 +- proto/go/gitalypb/lint.pb.go | 103 ++++------ proto/go/gitalypb/testproto/invalid.pb.go | 194 +++++++++--------- .../go/gitalypb/testproto/invalid_grpc.pb.go | 38 ---- proto/go/gitalypb/testproto/valid.pb.go | 53 +++-- proto/go/gitalypb/testproto/valid_grpc.pb.go | 38 ---- proto/lint.proto | 3 - proto/testproto/invalid.proto | 6 - proto/testproto/valid.proto | 5 - tools/protoc-gen-gitaly-lint/lint_test.go | 1 - 11 files changed, 159 insertions(+), 293 deletions(-) diff --git a/internal/praefect/protoregistry/protoregistry_test.go b/internal/praefect/protoregistry/protoregistry_test.go index 39d24e1f78..1d50dd0ab5 100644 --- a/internal/praefect/protoregistry/protoregistry_test.go +++ b/internal/praefect/protoregistry/protoregistry_test.go @@ -156,10 +156,6 @@ func TestNewProtoRegistry_IsInterceptedMethod(t *testing.T) { t.Parallel() for service, methods := range map[string][]string{ - "ServerService": { - "ServerInfo", - "DiskStatistics", - }, "PraefectInfoService": { "RepositoryReplicas", "DatalossCheck", diff --git a/internal/protoutil/extension.go b/internal/protoutil/extension.go index f7884b25c0..9885d00ca6 100644 --- a/internal/protoutil/extension.go +++ b/internal/protoutil/extension.go @@ -28,12 +28,7 @@ func IsInterceptedMethod(s *descriptorpb.ServiceDescriptorProto, m *descriptorpb return false, fmt.Errorf("is service intercepted: %w", err) } - isMethodIntercepted, err := getBoolExtension(m.GetOptions(), gitalypb.E_InterceptedMethod) - if err != nil { - return false, fmt.Errorf("is method intercepted: %w", err) - } - - return isServiceIntercepted || isMethodIntercepted, nil + return isServiceIntercepted, nil } // GetRepositoryExtension gets the repository extension from a field descriptor diff --git a/proto/go/gitalypb/lint.pb.go b/proto/go/gitalypb/lint.pb.go index a36b648de7..0c57e3dff8 100644 --- a/proto/go/gitalypb/lint.pb.go +++ b/proto/go/gitalypb/lint.pb.go @@ -205,14 +205,6 @@ var file_lint_proto_extTypes = []protoimpl.ExtensionInfo{ Tag: "bytes,82303,opt,name=op_type", Filename: "lint.proto", }, - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 82304, - Name: "gitaly.intercepted_method", - Tag: "varint,82304,opt,name=intercepted_method", - Filename: "lint.proto", - }, { ExtendedType: (*descriptorpb.FieldOptions)(nil), ExtensionType: (*bool)(nil), @@ -263,11 +255,6 @@ var ( // // optional gitaly.OperationMsg op_type = 82303; E_OpType = &file_lint_proto_extTypes[1] - // intercepted_method indicates whether the proxy intercepts and handles the method call - // instead of proxying. Intercepted methods do not require operation type annotations. - // - // optional bool intercepted_method = 82304; - E_InterceptedMethod = &file_lint_proto_extTypes[2] ) // Extension fields to descriptorpb.FieldOptions. @@ -275,7 +262,7 @@ var ( // Used to mark field containing name of affected storage. // // optional bool storage = 91233; - E_Storage = &file_lint_proto_extTypes[3] // Random high number.. + E_Storage = &file_lint_proto_extTypes[2] // Random high number.. // If this operation modifies a repository, this annotations // will specify the location of the Repository field within // the request message. @@ -284,15 +271,15 @@ var ( // when parent message is marked as target or additional repository // // optional bool repository = 91234; - E_Repository = &file_lint_proto_extTypes[4] + E_Repository = &file_lint_proto_extTypes[3] // Used to mark target repository // // optional bool target_repository = 91235; - E_TargetRepository = &file_lint_proto_extTypes[5] + E_TargetRepository = &file_lint_proto_extTypes[4] // Used to mark additional repository // // optional bool additional_repository = 91236; - E_AdditionalRepository = &file_lint_proto_extTypes[6] + E_AdditionalRepository = &file_lint_proto_extTypes[5] ) var File_lint_proto protoreflect.FileDescriptor @@ -326,34 +313,29 @@ var file_lint_proto_rawDesc = []byte{ 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, 0x82, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x6f, 0x70, - 0x54, 0x79, 0x70, 0x65, 0x3a, 0x4f, 0x0a, 0x12, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, - 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x80, 0x83, 0x05, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x11, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x39, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0xe1, 0xc8, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x3a, 0x3f, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe2, 0xc8, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x3a, 0x4c, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe3, 0xc8, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x3a, - 0x54, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe4, 0xc8, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, - 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2f, 0x76, 0x31, 0x36, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x54, 0x79, 0x70, 0x65, 0x3a, 0x39, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, + 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe1, + 0xc8, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x3a, + 0x3f, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe2, 0xc8, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x3a, 0x4c, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe3, 0xc8, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x3a, 0x54, + 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe4, 0xc8, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, + 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, + 0x74, 0x61, 0x6c, 0x79, 0x2f, 0x76, 0x31, 0x36, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -379,21 +361,20 @@ var file_lint_proto_goTypes = []interface{}{ (*descriptorpb.FieldOptions)(nil), // 5: google.protobuf.FieldOptions } var file_lint_proto_depIdxs = []int32{ - 0, // 0: gitaly.OperationMsg.op:type_name -> gitaly.OperationMsg.Operation - 1, // 1: gitaly.OperationMsg.scope_level:type_name -> gitaly.OperationMsg.Scope - 3, // 2: gitaly.intercepted:extendee -> google.protobuf.ServiceOptions - 4, // 3: gitaly.op_type:extendee -> google.protobuf.MethodOptions - 4, // 4: gitaly.intercepted_method:extendee -> google.protobuf.MethodOptions - 5, // 5: gitaly.storage:extendee -> google.protobuf.FieldOptions - 5, // 6: gitaly.repository:extendee -> google.protobuf.FieldOptions - 5, // 7: gitaly.target_repository:extendee -> google.protobuf.FieldOptions - 5, // 8: gitaly.additional_repository:extendee -> google.protobuf.FieldOptions - 2, // 9: gitaly.op_type:type_name -> gitaly.OperationMsg - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 9, // [9:10] is the sub-list for extension type_name - 2, // [2:9] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 0, // 0: gitaly.OperationMsg.op:type_name -> gitaly.OperationMsg.Operation + 1, // 1: gitaly.OperationMsg.scope_level:type_name -> gitaly.OperationMsg.Scope + 3, // 2: gitaly.intercepted:extendee -> google.protobuf.ServiceOptions + 4, // 3: gitaly.op_type:extendee -> google.protobuf.MethodOptions + 5, // 4: gitaly.storage:extendee -> google.protobuf.FieldOptions + 5, // 5: gitaly.repository:extendee -> google.protobuf.FieldOptions + 5, // 6: gitaly.target_repository:extendee -> google.protobuf.FieldOptions + 5, // 7: gitaly.additional_repository:extendee -> google.protobuf.FieldOptions + 2, // 8: gitaly.op_type:type_name -> gitaly.OperationMsg + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 8, // [8:9] is the sub-list for extension type_name + 2, // [2:8] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_lint_proto_init() } @@ -422,7 +403,7 @@ func file_lint_proto_init() { RawDescriptor: file_lint_proto_rawDesc, NumEnums: 2, NumMessages: 1, - NumExtensions: 7, + NumExtensions: 6, NumServices: 0, }, GoTypes: file_lint_proto_goTypes, diff --git a/proto/go/gitalypb/testproto/invalid.pb.go b/proto/go/gitalypb/testproto/invalid.pb.go index 9c5bae1039..f06cbee388 100644 --- a/proto/go/gitalypb/testproto/invalid.pb.go +++ b/proto/go/gitalypb/testproto/invalid.pb.go @@ -830,7 +830,7 @@ var file_testproto_invalid_proto_rawDesc = []byte{ 0x74, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x1a, 0x04, 0xf0, 0x97, 0x28, - 0x01, 0x32, 0x9c, 0x12, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x65, 0x72, + 0x01, 0x32, 0xb7, 0x11, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x30, 0x12, 0x1f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, @@ -910,77 +910,71 @@ var file_testproto_invalid_proto_rawDesc = []byte{ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xfa, 0x97, 0x28, 0x04, 0x08, 0x01, - 0x10, 0x02, 0x12, 0x63, 0x0a, 0x0f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x31, 0x35, 0x12, 0x24, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x1a, 0x20, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xfa, - 0x97, 0x28, 0x00, 0x80, 0x98, 0x28, 0x01, 0x12, 0x6d, 0x0a, 0x20, 0x4d, 0x61, 0x69, 0x6e, 0x74, - 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, - 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, 0x7a, 0x0a, 0x22, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, - 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x55, 0x6e, 0x66, 0x6c, 0x61, 0x67, 0x67, - 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2a, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x57, 0x69, 0x74, 0x68, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x4e, 0x6f, - 0x74, 0x46, 0x6c, 0x61, 0x67, 0x67, 0x65, 0x64, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, - 0x08, 0x03, 0x12, 0x7f, 0x0a, 0x28, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, - 0x65, 0x57, 0x69, 0x74, 0x68, 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, - 0x02, 0x08, 0x03, 0x12, 0x6a, 0x0a, 0x20, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, - 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, - 0x70, 0x0a, 0x23, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, - 0x74, 0x68, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x10, 0x02, 0x12, 0x6d, 0x0a, 0x20, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, - 0x03, 0x12, 0x75, 0x0a, 0x23, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, - 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, - 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x1a, 0x20, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, 0x81, 0x01, 0x0a, 0x29, 0x4d, 0x61, 0x69, - 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, - 0x70, 0x6f, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, + 0x03, 0x12, 0x7a, 0x0a, 0x22, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, + 0x57, 0x69, 0x74, 0x68, 0x55, 0x6e, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x65, 0x64, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x4e, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x4e, 0x6f, 0x74, 0x46, 0x6c, 0x61, 0x67, + 0x67, 0x65, 0x64, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, 0x7f, 0x0a, + 0x28, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, + 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, + 0x68, 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, 0x6a, + 0x0a, 0x20, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, + 0x68, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, + 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, 0x70, 0x0a, 0x23, 0x4d, 0x61, + 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, 0x72, 0x0a, 0x1b, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, 0x75, 0x0a, 0x23, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x27, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, - 0x52, 0x65, 0x70, 0x6f, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xfa, 0x97, 0x28, 0x04, 0x08, 0x03, 0x10, 0x02, - 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, - 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, - 0x2f, 0x76, 0x31, 0x36, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x69, - 0x74, 0x61, 0x6c, 0x79, 0x70, 0x62, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, + 0x02, 0x08, 0x03, 0x12, 0x81, 0x01, 0x0a, 0x29, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x12, 0x2a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x1a, 0x20, 0x2e, + 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, 0x72, 0x0a, 0x1b, 0x4d, 0x61, 0x69, 0x6e, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x27, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x1a, + 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x08, 0xfa, 0x97, 0x28, 0x04, 0x08, 0x03, 0x10, 0x02, 0x42, 0x3e, 0x5a, 0x3c, 0x67, + 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, + 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2f, 0x76, 0x31, 0x36, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70, + 0x62, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1040,40 +1034,38 @@ var file_testproto_invalid_proto_depIdxs = []int32{ 7, // 22: testproto.InvalidService.InvalidMethod11:input_type -> testproto.RequestWithNestedStorageAndRepo 2, // 23: testproto.InvalidService.InvalidMethod13:input_type -> testproto.InvalidTargetType 8, // 24: testproto.InvalidService.InvalidMethod14:input_type -> testproto.RequestWithMultipleNestedStorage - 6, // 25: testproto.InvalidService.InvalidMethod15:input_type -> testproto.RequestWithStorageAndRepo - 0, // 26: testproto.InvalidService.MaintenanceWithMissingRepository:input_type -> testproto.InvalidMethodRequest - 11, // 27: testproto.InvalidService.MaintenanceWithUnflaggedRepository:input_type -> testproto.RequestWithNestedRepoNotFlagged - 10, // 28: testproto.InvalidService.MaintenanceWithWrongNestedRepositoryType:input_type -> testproto.RequestWithWrongTypeRepository - 2, // 29: testproto.InvalidService.MaintenanceWithInvalidTargetType:input_type -> testproto.InvalidTargetType - 4, // 30: testproto.InvalidService.MaintenanceWithInvalidNestedRequest:input_type -> testproto.InvalidNestedRequest - 6, // 31: testproto.InvalidService.MaintenanceWithStorageAndRepository:input_type -> testproto.RequestWithStorageAndRepo - 7, // 32: testproto.InvalidService.MaintenanceWithNestedStorageAndRepository:input_type -> testproto.RequestWithNestedStorageAndRepo - 1, // 33: testproto.InvalidService.MaintenanceWithStorageScope:input_type -> testproto.InvalidMethodRequestWithRepo - 3, // 34: testproto.InterceptedWithOperationType.InvalidMethod:output_type -> testproto.InvalidMethodResponse - 3, // 35: testproto.InvalidService.InvalidMethod0:output_type -> testproto.InvalidMethodResponse - 3, // 36: testproto.InvalidService.InvalidMethod1:output_type -> testproto.InvalidMethodResponse - 3, // 37: testproto.InvalidService.InvalidMethod2:output_type -> testproto.InvalidMethodResponse - 3, // 38: testproto.InvalidService.InvalidMethod4:output_type -> testproto.InvalidMethodResponse - 3, // 39: testproto.InvalidService.InvalidMethod5:output_type -> testproto.InvalidMethodResponse - 3, // 40: testproto.InvalidService.InvalidMethod6:output_type -> testproto.InvalidMethodResponse - 3, // 41: testproto.InvalidService.InvalidMethod7:output_type -> testproto.InvalidMethodResponse - 3, // 42: testproto.InvalidService.InvalidMethod8:output_type -> testproto.InvalidMethodResponse - 3, // 43: testproto.InvalidService.InvalidMethod9:output_type -> testproto.InvalidMethodResponse - 3, // 44: testproto.InvalidService.InvalidMethod10:output_type -> testproto.InvalidMethodResponse - 3, // 45: testproto.InvalidService.InvalidMethod11:output_type -> testproto.InvalidMethodResponse - 3, // 46: testproto.InvalidService.InvalidMethod13:output_type -> testproto.InvalidMethodResponse - 3, // 47: testproto.InvalidService.InvalidMethod14:output_type -> testproto.InvalidMethodResponse - 3, // 48: testproto.InvalidService.InvalidMethod15:output_type -> testproto.InvalidMethodResponse - 3, // 49: testproto.InvalidService.MaintenanceWithMissingRepository:output_type -> testproto.InvalidMethodResponse - 3, // 50: testproto.InvalidService.MaintenanceWithUnflaggedRepository:output_type -> testproto.InvalidMethodResponse - 3, // 51: testproto.InvalidService.MaintenanceWithWrongNestedRepositoryType:output_type -> testproto.InvalidMethodResponse - 3, // 52: testproto.InvalidService.MaintenanceWithInvalidTargetType:output_type -> testproto.InvalidMethodResponse - 3, // 53: testproto.InvalidService.MaintenanceWithInvalidNestedRequest:output_type -> testproto.InvalidMethodResponse - 3, // 54: testproto.InvalidService.MaintenanceWithStorageAndRepository:output_type -> testproto.InvalidMethodResponse - 3, // 55: testproto.InvalidService.MaintenanceWithNestedStorageAndRepository:output_type -> testproto.InvalidMethodResponse - 3, // 56: testproto.InvalidService.MaintenanceWithStorageScope:output_type -> testproto.InvalidMethodResponse - 34, // [34:57] is the sub-list for method output_type - 11, // [11:34] is the sub-list for method input_type + 0, // 25: testproto.InvalidService.MaintenanceWithMissingRepository:input_type -> testproto.InvalidMethodRequest + 11, // 26: testproto.InvalidService.MaintenanceWithUnflaggedRepository:input_type -> testproto.RequestWithNestedRepoNotFlagged + 10, // 27: testproto.InvalidService.MaintenanceWithWrongNestedRepositoryType:input_type -> testproto.RequestWithWrongTypeRepository + 2, // 28: testproto.InvalidService.MaintenanceWithInvalidTargetType:input_type -> testproto.InvalidTargetType + 4, // 29: testproto.InvalidService.MaintenanceWithInvalidNestedRequest:input_type -> testproto.InvalidNestedRequest + 6, // 30: testproto.InvalidService.MaintenanceWithStorageAndRepository:input_type -> testproto.RequestWithStorageAndRepo + 7, // 31: testproto.InvalidService.MaintenanceWithNestedStorageAndRepository:input_type -> testproto.RequestWithNestedStorageAndRepo + 1, // 32: testproto.InvalidService.MaintenanceWithStorageScope:input_type -> testproto.InvalidMethodRequestWithRepo + 3, // 33: testproto.InterceptedWithOperationType.InvalidMethod:output_type -> testproto.InvalidMethodResponse + 3, // 34: testproto.InvalidService.InvalidMethod0:output_type -> testproto.InvalidMethodResponse + 3, // 35: testproto.InvalidService.InvalidMethod1:output_type -> testproto.InvalidMethodResponse + 3, // 36: testproto.InvalidService.InvalidMethod2:output_type -> testproto.InvalidMethodResponse + 3, // 37: testproto.InvalidService.InvalidMethod4:output_type -> testproto.InvalidMethodResponse + 3, // 38: testproto.InvalidService.InvalidMethod5:output_type -> testproto.InvalidMethodResponse + 3, // 39: testproto.InvalidService.InvalidMethod6:output_type -> testproto.InvalidMethodResponse + 3, // 40: testproto.InvalidService.InvalidMethod7:output_type -> testproto.InvalidMethodResponse + 3, // 41: testproto.InvalidService.InvalidMethod8:output_type -> testproto.InvalidMethodResponse + 3, // 42: testproto.InvalidService.InvalidMethod9:output_type -> testproto.InvalidMethodResponse + 3, // 43: testproto.InvalidService.InvalidMethod10:output_type -> testproto.InvalidMethodResponse + 3, // 44: testproto.InvalidService.InvalidMethod11:output_type -> testproto.InvalidMethodResponse + 3, // 45: testproto.InvalidService.InvalidMethod13:output_type -> testproto.InvalidMethodResponse + 3, // 46: testproto.InvalidService.InvalidMethod14:output_type -> testproto.InvalidMethodResponse + 3, // 47: testproto.InvalidService.MaintenanceWithMissingRepository:output_type -> testproto.InvalidMethodResponse + 3, // 48: testproto.InvalidService.MaintenanceWithUnflaggedRepository:output_type -> testproto.InvalidMethodResponse + 3, // 49: testproto.InvalidService.MaintenanceWithWrongNestedRepositoryType:output_type -> testproto.InvalidMethodResponse + 3, // 50: testproto.InvalidService.MaintenanceWithInvalidTargetType:output_type -> testproto.InvalidMethodResponse + 3, // 51: testproto.InvalidService.MaintenanceWithInvalidNestedRequest:output_type -> testproto.InvalidMethodResponse + 3, // 52: testproto.InvalidService.MaintenanceWithStorageAndRepository:output_type -> testproto.InvalidMethodResponse + 3, // 53: testproto.InvalidService.MaintenanceWithNestedStorageAndRepository:output_type -> testproto.InvalidMethodResponse + 3, // 54: testproto.InvalidService.MaintenanceWithStorageScope:output_type -> testproto.InvalidMethodResponse + 33, // [33:55] is the sub-list for method output_type + 11, // [11:33] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name 11, // [11:11] is the sub-list for extension extendee 0, // [0:11] is the sub-list for field type_name diff --git a/proto/go/gitalypb/testproto/invalid_grpc.pb.go b/proto/go/gitalypb/testproto/invalid_grpc.pb.go index dda8cb24aa..f12ce69e64 100644 --- a/proto/go/gitalypb/testproto/invalid_grpc.pb.go +++ b/proto/go/gitalypb/testproto/invalid_grpc.pb.go @@ -137,8 +137,6 @@ type InvalidServiceClient interface { InvalidMethod13(ctx context.Context, in *InvalidTargetType, opts ...grpc.CallOption) (*InvalidMethodResponse, error) // should fail if multiple storage is specified for storage scoped RPC InvalidMethod14(ctx context.Context, in *RequestWithMultipleNestedStorage, opts ...grpc.CallOption) (*InvalidMethodResponse, error) - // Intercepted methods must not have operation type annotations. - InvalidMethod15(ctx context.Context, in *RequestWithStorageAndRepo, opts ...grpc.CallOption) (*InvalidMethodResponse, error) MaintenanceWithMissingRepository(ctx context.Context, in *InvalidMethodRequest, opts ...grpc.CallOption) (*InvalidMethodResponse, error) MaintenanceWithUnflaggedRepository(ctx context.Context, in *RequestWithNestedRepoNotFlagged, opts ...grpc.CallOption) (*InvalidMethodResponse, error) MaintenanceWithWrongNestedRepositoryType(ctx context.Context, in *RequestWithWrongTypeRepository, opts ...grpc.CallOption) (*InvalidMethodResponse, error) @@ -274,15 +272,6 @@ func (c *invalidServiceClient) InvalidMethod14(ctx context.Context, in *RequestW return out, nil } -func (c *invalidServiceClient) InvalidMethod15(ctx context.Context, in *RequestWithStorageAndRepo, opts ...grpc.CallOption) (*InvalidMethodResponse, error) { - out := new(InvalidMethodResponse) - err := c.cc.Invoke(ctx, "/testproto.InvalidService/InvalidMethod15", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *invalidServiceClient) MaintenanceWithMissingRepository(ctx context.Context, in *InvalidMethodRequest, opts ...grpc.CallOption) (*InvalidMethodResponse, error) { out := new(InvalidMethodResponse) err := c.cc.Invoke(ctx, "/testproto.InvalidService/MaintenanceWithMissingRepository", in, out, opts...) @@ -385,8 +374,6 @@ type InvalidServiceServer interface { InvalidMethod13(context.Context, *InvalidTargetType) (*InvalidMethodResponse, error) // should fail if multiple storage is specified for storage scoped RPC InvalidMethod14(context.Context, *RequestWithMultipleNestedStorage) (*InvalidMethodResponse, error) - // Intercepted methods must not have operation type annotations. - InvalidMethod15(context.Context, *RequestWithStorageAndRepo) (*InvalidMethodResponse, error) MaintenanceWithMissingRepository(context.Context, *InvalidMethodRequest) (*InvalidMethodResponse, error) MaintenanceWithUnflaggedRepository(context.Context, *RequestWithNestedRepoNotFlagged) (*InvalidMethodResponse, error) MaintenanceWithWrongNestedRepositoryType(context.Context, *RequestWithWrongTypeRepository) (*InvalidMethodResponse, error) @@ -441,9 +428,6 @@ func (UnimplementedInvalidServiceServer) InvalidMethod13(context.Context, *Inval func (UnimplementedInvalidServiceServer) InvalidMethod14(context.Context, *RequestWithMultipleNestedStorage) (*InvalidMethodResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InvalidMethod14 not implemented") } -func (UnimplementedInvalidServiceServer) InvalidMethod15(context.Context, *RequestWithStorageAndRepo) (*InvalidMethodResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method InvalidMethod15 not implemented") -} func (UnimplementedInvalidServiceServer) MaintenanceWithMissingRepository(context.Context, *InvalidMethodRequest) (*InvalidMethodResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MaintenanceWithMissingRepository not implemented") } @@ -715,24 +699,6 @@ func _InvalidService_InvalidMethod14_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } -func _InvalidService_InvalidMethod15_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestWithStorageAndRepo) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(InvalidServiceServer).InvalidMethod15(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testproto.InvalidService/InvalidMethod15", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InvalidServiceServer).InvalidMethod15(ctx, req.(*RequestWithStorageAndRepo)) - } - return interceptor(ctx, in, info, handler) -} - func _InvalidService_MaintenanceWithMissingRepository_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(InvalidMethodRequest) if err := dec(in); err != nil { @@ -936,10 +902,6 @@ var InvalidService_ServiceDesc = grpc.ServiceDesc{ MethodName: "InvalidMethod14", Handler: _InvalidService_InvalidMethod14_Handler, }, - { - MethodName: "InvalidMethod15", - Handler: _InvalidService_InvalidMethod15_Handler, - }, { MethodName: "MaintenanceWithMissingRepository", Handler: _InvalidService_MaintenanceWithMissingRepository_Handler, diff --git a/proto/go/gitalypb/testproto/valid.pb.go b/proto/go/gitalypb/testproto/valid.pb.go index a85ff56ed3..ea1ea44074 100644 --- a/proto/go/gitalypb/testproto/valid.pb.go +++ b/proto/go/gitalypb/testproto/valid.pb.go @@ -582,7 +582,7 @@ var file_testproto_valid_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x04, 0xf0, 0x97, 0x28, 0x01, - 0x32, 0xd0, 0x09, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x32, 0x80, 0x09, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, @@ -623,12 +623,7 @@ var file_testproto_valid_proto_rawDesc = []byte{ 0x72, 0x61, 0x67, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xfa, 0x97, 0x28, - 0x04, 0x08, 0x01, 0x10, 0x02, 0x12, 0x4e, 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x31, 0x30, 0x12, 0x1e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x04, 0x80, 0x98, 0x28, 0x01, 0x12, 0x4c, 0x0a, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x69, + 0x04, 0x08, 0x01, 0x10, 0x02, 0x12, 0x4c, 0x0a, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, @@ -711,29 +706,27 @@ var file_testproto_valid_proto_depIdxs = []int32{ 7, // 13: testproto.ValidService.TestMethod7:input_type -> testproto.ValidInnerNestedRequest 2, // 14: testproto.ValidService.TestMethod8:input_type -> testproto.ValidStorageRequest 5, // 15: testproto.ValidService.TestMethod9:input_type -> testproto.ValidStorageNestedRequest - 2, // 16: testproto.ValidService.TestMethod10:input_type -> testproto.ValidStorageRequest - 0, // 17: testproto.ValidService.TestMaintenance:input_type -> testproto.ValidRequest - 0, // 18: testproto.ValidService.TestMaintenanceWithExplicitScope:input_type -> testproto.ValidRequest - 4, // 19: testproto.ValidService.TestMaintenanceWithNestedRequest:input_type -> testproto.ValidNestedRequest - 6, // 20: testproto.ValidService.TestMaintenanceWithNestedSharedRequest:input_type -> testproto.ValidNestedSharedRequest - 7, // 21: testproto.ValidService.TestMutatorWithInnerNestedRequest:input_type -> testproto.ValidInnerNestedRequest - 3, // 22: testproto.InterceptedService.TestMethod:output_type -> testproto.ValidResponse - 3, // 23: testproto.ValidService.TestMethod:output_type -> testproto.ValidResponse - 3, // 24: testproto.ValidService.TestMethod2:output_type -> testproto.ValidResponse - 3, // 25: testproto.ValidService.TestMethod3:output_type -> testproto.ValidResponse - 3, // 26: testproto.ValidService.TestMethod5:output_type -> testproto.ValidResponse - 3, // 27: testproto.ValidService.TestMethod6:output_type -> testproto.ValidResponse - 3, // 28: testproto.ValidService.TestMethod7:output_type -> testproto.ValidResponse - 3, // 29: testproto.ValidService.TestMethod8:output_type -> testproto.ValidResponse - 3, // 30: testproto.ValidService.TestMethod9:output_type -> testproto.ValidResponse - 3, // 31: testproto.ValidService.TestMethod10:output_type -> testproto.ValidResponse - 3, // 32: testproto.ValidService.TestMaintenance:output_type -> testproto.ValidResponse - 3, // 33: testproto.ValidService.TestMaintenanceWithExplicitScope:output_type -> testproto.ValidResponse - 3, // 34: testproto.ValidService.TestMaintenanceWithNestedRequest:output_type -> testproto.ValidResponse - 3, // 35: testproto.ValidService.TestMaintenanceWithNestedSharedRequest:output_type -> testproto.ValidResponse - 3, // 36: testproto.ValidService.TestMutatorWithInnerNestedRequest:output_type -> testproto.ValidResponse - 22, // [22:37] is the sub-list for method output_type - 7, // [7:22] is the sub-list for method input_type + 0, // 16: testproto.ValidService.TestMaintenance:input_type -> testproto.ValidRequest + 0, // 17: testproto.ValidService.TestMaintenanceWithExplicitScope:input_type -> testproto.ValidRequest + 4, // 18: testproto.ValidService.TestMaintenanceWithNestedRequest:input_type -> testproto.ValidNestedRequest + 6, // 19: testproto.ValidService.TestMaintenanceWithNestedSharedRequest:input_type -> testproto.ValidNestedSharedRequest + 7, // 20: testproto.ValidService.TestMutatorWithInnerNestedRequest:input_type -> testproto.ValidInnerNestedRequest + 3, // 21: testproto.InterceptedService.TestMethod:output_type -> testproto.ValidResponse + 3, // 22: testproto.ValidService.TestMethod:output_type -> testproto.ValidResponse + 3, // 23: testproto.ValidService.TestMethod2:output_type -> testproto.ValidResponse + 3, // 24: testproto.ValidService.TestMethod3:output_type -> testproto.ValidResponse + 3, // 25: testproto.ValidService.TestMethod5:output_type -> testproto.ValidResponse + 3, // 26: testproto.ValidService.TestMethod6:output_type -> testproto.ValidResponse + 3, // 27: testproto.ValidService.TestMethod7:output_type -> testproto.ValidResponse + 3, // 28: testproto.ValidService.TestMethod8:output_type -> testproto.ValidResponse + 3, // 29: testproto.ValidService.TestMethod9:output_type -> testproto.ValidResponse + 3, // 30: testproto.ValidService.TestMaintenance:output_type -> testproto.ValidResponse + 3, // 31: testproto.ValidService.TestMaintenanceWithExplicitScope:output_type -> testproto.ValidResponse + 3, // 32: testproto.ValidService.TestMaintenanceWithNestedRequest:output_type -> testproto.ValidResponse + 3, // 33: testproto.ValidService.TestMaintenanceWithNestedSharedRequest:output_type -> testproto.ValidResponse + 3, // 34: testproto.ValidService.TestMutatorWithInnerNestedRequest:output_type -> testproto.ValidResponse + 21, // [21:35] is the sub-list for method output_type + 7, // [7:21] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name 7, // [7:7] is the sub-list for extension extendee 0, // [0:7] is the sub-list for field type_name diff --git a/proto/go/gitalypb/testproto/valid_grpc.pb.go b/proto/go/gitalypb/testproto/valid_grpc.pb.go index 40508d03b9..99d89d9d2f 100644 --- a/proto/go/gitalypb/testproto/valid_grpc.pb.go +++ b/proto/go/gitalypb/testproto/valid_grpc.pb.go @@ -116,8 +116,6 @@ type ValidServiceClient interface { TestMethod7(ctx context.Context, in *ValidInnerNestedRequest, opts ...grpc.CallOption) (*ValidResponse, error) TestMethod8(ctx context.Context, in *ValidStorageRequest, opts ...grpc.CallOption) (*ValidResponse, error) TestMethod9(ctx context.Context, in *ValidStorageNestedRequest, opts ...grpc.CallOption) (*ValidResponse, error) - // Intercepted methods do not need operation type annotations. - TestMethod10(ctx context.Context, in *ValidStorageRequest, opts ...grpc.CallOption) (*ValidResponse, error) TestMaintenance(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error) TestMaintenanceWithExplicitScope(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error) TestMaintenanceWithNestedRequest(ctx context.Context, in *ValidNestedRequest, opts ...grpc.CallOption) (*ValidResponse, error) @@ -205,15 +203,6 @@ func (c *validServiceClient) TestMethod9(ctx context.Context, in *ValidStorageNe return out, nil } -func (c *validServiceClient) TestMethod10(ctx context.Context, in *ValidStorageRequest, opts ...grpc.CallOption) (*ValidResponse, error) { - out := new(ValidResponse) - err := c.cc.Invoke(ctx, "/testproto.ValidService/TestMethod10", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *validServiceClient) TestMaintenance(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error) { out := new(ValidResponse) err := c.cc.Invoke(ctx, "/testproto.ValidService/TestMaintenance", in, out, opts...) @@ -271,8 +260,6 @@ type ValidServiceServer interface { TestMethod7(context.Context, *ValidInnerNestedRequest) (*ValidResponse, error) TestMethod8(context.Context, *ValidStorageRequest) (*ValidResponse, error) TestMethod9(context.Context, *ValidStorageNestedRequest) (*ValidResponse, error) - // Intercepted methods do not need operation type annotations. - TestMethod10(context.Context, *ValidStorageRequest) (*ValidResponse, error) TestMaintenance(context.Context, *ValidRequest) (*ValidResponse, error) TestMaintenanceWithExplicitScope(context.Context, *ValidRequest) (*ValidResponse, error) TestMaintenanceWithNestedRequest(context.Context, *ValidNestedRequest) (*ValidResponse, error) @@ -309,9 +296,6 @@ func (UnimplementedValidServiceServer) TestMethod8(context.Context, *ValidStorag func (UnimplementedValidServiceServer) TestMethod9(context.Context, *ValidStorageNestedRequest) (*ValidResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestMethod9 not implemented") } -func (UnimplementedValidServiceServer) TestMethod10(context.Context, *ValidStorageRequest) (*ValidResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TestMethod10 not implemented") -} func (UnimplementedValidServiceServer) TestMaintenance(context.Context, *ValidRequest) (*ValidResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestMaintenance not implemented") } @@ -484,24 +468,6 @@ func _ValidService_TestMethod9_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _ValidService_TestMethod10_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidStorageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ValidServiceServer).TestMethod10(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testproto.ValidService/TestMethod10", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ValidServiceServer).TestMethod10(ctx, req.(*ValidStorageRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _ValidService_TestMaintenance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ValidRequest) if err := dec(in); err != nil { @@ -631,10 +597,6 @@ var ValidService_ServiceDesc = grpc.ServiceDesc{ MethodName: "TestMethod9", Handler: _ValidService_TestMethod9_Handler, }, - { - MethodName: "TestMethod10", - Handler: _ValidService_TestMethod10_Handler, - }, { MethodName: "TestMaintenance", Handler: _ValidService_TestMaintenance_Handler, diff --git a/proto/lint.proto b/proto/lint.proto index e470771f30..62e4c5f88e 100644 --- a/proto/lint.proto +++ b/proto/lint.proto @@ -51,9 +51,6 @@ extend google.protobuf.ServiceOptions { extend google.protobuf.MethodOptions { // Random high number.. OperationMsg op_type = 82303; - // intercepted_method indicates whether the proxy intercepts and handles the method call - // instead of proxying. Intercepted methods do not require operation type annotations. - bool intercepted_method = 82304; } extend google.protobuf.FieldOptions { diff --git a/proto/testproto/invalid.proto b/proto/testproto/invalid.proto index 33db4d2fba..8b3ec2953c 100644 --- a/proto/testproto/invalid.proto +++ b/proto/testproto/invalid.proto @@ -159,12 +159,6 @@ service InvalidService { }; } - // Intercepted methods must not have operation type annotations. - rpc InvalidMethod15(RequestWithStorageAndRepo) returns (InvalidMethodResponse) { - option (gitaly.intercepted_method) = true; - option (gitaly.op_type) = {}; - }; - rpc MaintenanceWithMissingRepository(InvalidMethodRequest) returns (InvalidMethodResponse) { option (gitaly.op_type).op = MAINTENANCE; } diff --git a/proto/testproto/valid.proto b/proto/testproto/valid.proto index 82a51e9245..cfe96f0cba 100644 --- a/proto/testproto/valid.proto +++ b/proto/testproto/valid.proto @@ -109,11 +109,6 @@ service ValidService { }; } - // Intercepted methods do not need operation type annotations. - rpc TestMethod10(ValidStorageRequest) returns (ValidResponse) { - option (gitaly.intercepted_method) = true; - } - rpc TestMaintenance(ValidRequest) returns (ValidResponse) { option (gitaly.op_type) = { op: MAINTENANCE diff --git a/tools/protoc-gen-gitaly-lint/lint_test.go b/tools/protoc-gen-gitaly-lint/lint_test.go index c0c37dede8..6387bb5583 100644 --- a/tools/protoc-gen-gitaly-lint/lint_test.go +++ b/tools/protoc-gen-gitaly-lint/lint_test.go @@ -38,7 +38,6 @@ func TestLintFile(t *testing.T) { formatError("testproto/invalid.proto", "InvalidService", "InvalidMethod11", errors.New("unexpected count of storage field 1, expected 0, found storage label at: [RequestWithNestedStorageAndRepo.inner_message.storage_name]")), formatError("testproto/invalid.proto", "InvalidService", "InvalidMethod13", errors.New("unexpected count of storage field 0, expected 1, found storage label at: []")), formatError("testproto/invalid.proto", "InvalidService", "InvalidMethod14", errors.New("unexpected count of storage field 2, expected 1, found storage label at: [RequestWithMultipleNestedStorage.inner_message.storage_name RequestWithMultipleNestedStorage.storage_name]")), - formatError("testproto/invalid.proto", "InvalidService", "InvalidMethod15", errors.New("operation type defined on an intercepted method")), formatError("testproto/invalid.proto", "InvalidService", "MaintenanceWithMissingRepository", errors.New("unexpected count of target_repository fields 0, expected 1, found target_repository label at: []")), formatError("testproto/invalid.proto", "InvalidService", "MaintenanceWithUnflaggedRepository", errors.New("unexpected count of target_repository fields 0, expected 1, found target_repository label at: []")), formatError("testproto/invalid.proto", "InvalidService", "MaintenanceWithWrongNestedRepositoryType", errors.New("wrong type of field RequestWithWrongTypeRepository.header.repository, expected .gitaly.Repository, got .testproto.InvalidMethodResponse")), -- GitLab