diff options
author | James Fargher <proglottis@gmail.com> | 2021-01-26 02:36:33 +0300 |
---|---|---|
committer | James Fargher <proglottis@gmail.com> | 2021-01-26 02:36:33 +0300 |
commit | 8a89e58820df0acde497fc3a084237ec316847a2 (patch) | |
tree | 88e80caeb5700f067607fd49b1dab58a649b8eca | |
parent | c7bd42c9eeebf0864cab55a60a09718f842cf359 (diff) | |
parent | 923ee7ee5f595df73dc1ad0ca931b7d2a62ed93a (diff) |
Merge branch 'smh-remove-server-scope' into 'master'
Remove server scope from Praefect
Closes #3122
See merge request gitlab-org/gitaly!3015
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | internal/praefect/Makefile | 3 | ||||
-rw-r--r-- | internal/praefect/auth_test.go | 16 | ||||
-rw-r--r-- | internal/praefect/helper_test.go | 4 | ||||
-rw-r--r-- | internal/praefect/middleware/errorhandler_test.go | 6 | ||||
-rw-r--r-- | internal/praefect/mock/mock.pb.go | 166 | ||||
-rw-r--r-- | internal/praefect/mock/mock.proto | 19 | ||||
-rw-r--r-- | internal/praefect/mocksvc_test.go | 11 | ||||
-rw-r--r-- | internal/praefect/protoregistry/protoregistry.go | 5 | ||||
-rw-r--r-- | internal/praefect/server_test.go | 62 | ||||
-rw-r--r-- | proto/go/gitalypb/lint.pb.go | 59 | ||||
-rw-r--r-- | proto/go/internal/linter/lint_test.go | 2 | ||||
-rw-r--r-- | proto/go/internal/linter/method.go | 10 | ||||
-rw-r--r-- | proto/go/internal/linter/testdata/invalid.pb.go | 169 | ||||
-rw-r--r-- | proto/go/internal/linter/testdata/invalid.proto | 15 | ||||
-rw-r--r-- | proto/go/internal/linter/testdata/valid.pb.go | 107 | ||||
-rw-r--r-- | proto/go/internal/linter/testdata/valid.proto | 7 | ||||
-rw-r--r-- | proto/lint.proto | 4 | ||||
-rw-r--r-- | ruby/proto/gitaly/lint_pb.rb | 1 |
19 files changed, 169 insertions, 498 deletions
@@ -342,6 +342,7 @@ proto: ${PROTOC} ${PROTOC_GEN_GO} ${SOURCE_DIR}/.ruby-bundle ${SOURCE_DIR}/_support/generate-proto-ruby ${Q}# this part is related to the generation of sources from testing proto files ${PROTOC} --plugin=${PROTOC_GEN_GO} --go_out=plugins=grpc:. internal/praefect/grpc-proxy/testdata/test.proto + ${PROTOC} -I proto -I internal --plugin=${PROTOC_GEN_GO} --go_out=paths=source_relative,plugins=grpc:internal internal/praefect/mock/mock.proto ${PROTOC} -I proto -I internal --plugin=${PROTOC_GEN_GO} --go_out=paths=source_relative,plugins=grpc:internal internal/middleware/cache/testdata/stream.proto ${PROTOC} -I proto --plugin=${PROTOC_GEN_GO} --go_out=paths=source_relative,plugins=grpc:proto proto/go/internal/linter/testdata/*.proto diff --git a/internal/praefect/Makefile b/internal/praefect/Makefile deleted file mode 100644 index 849369671..000000000 --- a/internal/praefect/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -mock/mock.pb.go: mock/mock.proto - protoc --go_out=paths=source_relative,plugins=grpc:./mock -I$(shell pwd)/../../proto -I$(shell pwd)/mock $(shell pwd)/mock/*.proto - goimports -w mock/mock.pb.go diff --git a/internal/praefect/auth_test.go b/internal/praefect/auth_test.go index 855cf2806..37d8b6e61 100644 --- a/internal/praefect/auth_test.go +++ b/internal/praefect/auth_test.go @@ -61,10 +61,7 @@ func TestAuthFailures(t *testing.T) { cli := mock.NewSimpleServiceClient(conn) - _, err = cli.ServerAccessor(ctx, &mock.SimpleRequest{ - Value: 1, - }) - + _, err = cli.RepoAccessorUnary(ctx, &mock.RepoRequest{}) testhelper.RequireGrpcError(t, err, tc.code) }) } @@ -134,14 +131,7 @@ func dial(serverSocketPath string, opts []grpc.DialOption) (*grpc.ClientConn, er func runServer(t *testing.T, token string, required bool) (*grpc.Server, string, func()) { backendToken := "abcxyz" - mockServer := &mockSvc{ - serverAccessor: func(_ context.Context, req *mock.SimpleRequest) (*mock.SimpleResponse, error) { - return &mock.SimpleResponse{ - Value: req.Value + 1, - }, nil - }, - } - backend, cleanup := newMockDownstream(t, backendToken, mockServer) + backend, cleanup := newMockDownstream(t, backendToken, &mockSvc{}) conf := config.Config{ Auth: auth.Config{Token: token, Transitioning: !required}, @@ -159,7 +149,7 @@ func runServer(t *testing.T, token string, required bool) (*grpc.Server, string, }, } - gz := proto.FileDescriptor("mock.proto") + gz := proto.FileDescriptor("praefect/mock/mock.proto") fd, err := protoregistry.ExtractFileDescriptor(gz) if err != nil { t.Fatal(err) diff --git a/internal/praefect/helper_test.go b/internal/praefect/helper_test.go index 9b11398f3..d5ffebf93 100644 --- a/internal/praefect/helper_test.go +++ b/internal/praefect/helper_test.go @@ -7,6 +7,7 @@ import ( "testing" "time" + "github.com/golang/protobuf/proto" "github.com/golang/protobuf/protoc-gen-go/descriptor" "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" @@ -269,8 +270,7 @@ func runPraefectServer(t testing.TB, conf config.Config, opt buildOptions) (*grp } func mustLoadProtoReg(t testing.TB) *descriptor.FileDescriptorProto { - gz, _ := (*mock.SimpleRequest)(nil).Descriptor() - fd, err := protoregistry.ExtractFileDescriptor(gz) + fd, err := protoregistry.ExtractFileDescriptor(proto.FileDescriptor("praefect/mock/mock.proto")) require.NoError(t, err) return fd } diff --git a/internal/praefect/middleware/errorhandler_test.go b/internal/praefect/middleware/errorhandler_test.go index 773e55b92..e237db85a 100644 --- a/internal/praefect/middleware/errorhandler_test.go +++ b/internal/praefect/middleware/errorhandler_test.go @@ -37,10 +37,6 @@ func (s *simpleService) RepoMutatorUnary(ctx context.Context, in *mock.RepoReque return &empty.Empty{}, nil } -func (s *simpleService) ServerAccessor(ctx context.Context, in *mock.SimpleRequest) (*mock.SimpleResponse, error) { - return &mock.SimpleResponse{}, nil -} - func TestStreamInterceptor(t *testing.T) { ctx, cancel := testhelper.Context() defer cancel() @@ -57,7 +53,7 @@ func TestStreamInterceptor(t *testing.T) { lis, err := net.Listen("unix", internalServerSocketPath) require.NoError(t, err) - gz := proto.FileDescriptor("mock.proto") + gz := proto.FileDescriptor("praefect/mock/mock.proto") fd, err := protoregistry.ExtractFileDescriptor(gz) require.NoError(t, err) diff --git a/internal/praefect/mock/mock.pb.go b/internal/praefect/mock/mock.pb.go index 6f66b292b..0318d8f26 100644 --- a/internal/praefect/mock/mock.pb.go +++ b/internal/praefect/mock/mock.pb.go @@ -1,19 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: mock.proto +// source: praefect/mock/mock.proto package mock import ( context "context" fmt "fmt" - math "math" - proto "github.com/golang/protobuf/proto" empty "github.com/golang/protobuf/ptypes/empty" gitalypb "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -27,84 +26,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -type SimpleRequest struct { - Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SimpleRequest) Reset() { *m = SimpleRequest{} } -func (m *SimpleRequest) String() string { return proto.CompactTextString(m) } -func (*SimpleRequest) ProtoMessage() {} -func (*SimpleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6fa4806c90f7156d, []int{0} -} - -func (m *SimpleRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SimpleRequest.Unmarshal(m, b) -} -func (m *SimpleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SimpleRequest.Marshal(b, m, deterministic) -} -func (m *SimpleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimpleRequest.Merge(m, src) -} -func (m *SimpleRequest) XXX_Size() int { - return xxx_messageInfo_SimpleRequest.Size(m) -} -func (m *SimpleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SimpleRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SimpleRequest proto.InternalMessageInfo - -func (m *SimpleRequest) GetValue() int32 { - if m != nil { - return m.Value - } - return 0 -} - -type SimpleResponse struct { - Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SimpleResponse) Reset() { *m = SimpleResponse{} } -func (m *SimpleResponse) String() string { return proto.CompactTextString(m) } -func (*SimpleResponse) ProtoMessage() {} -func (*SimpleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6fa4806c90f7156d, []int{1} -} - -func (m *SimpleResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SimpleResponse.Unmarshal(m, b) -} -func (m *SimpleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SimpleResponse.Marshal(b, m, deterministic) -} -func (m *SimpleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimpleResponse.Merge(m, src) -} -func (m *SimpleResponse) XXX_Size() int { - return xxx_messageInfo_SimpleResponse.Size(m) -} -func (m *SimpleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SimpleResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SimpleResponse proto.InternalMessageInfo - -func (m *SimpleResponse) GetValue() int32 { - if m != nil { - return m.Value - } - return 0 -} - type RepoRequest struct { Repo *gitalypb.Repository `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -116,7 +37,7 @@ func (m *RepoRequest) Reset() { *m = RepoRequest{} } func (m *RepoRequest) String() string { return proto.CompactTextString(m) } func (*RepoRequest) ProtoMessage() {} func (*RepoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6fa4806c90f7156d, []int{2} + return fileDescriptor_d20d83172fd49eb0, []int{0} } func (m *RepoRequest) XXX_Unmarshal(b []byte) error { @@ -145,33 +66,28 @@ func (m *RepoRequest) GetRepo() *gitalypb.Repository { } func init() { - proto.RegisterType((*SimpleRequest)(nil), "mock.SimpleRequest") - proto.RegisterType((*SimpleResponse)(nil), "mock.SimpleResponse") proto.RegisterType((*RepoRequest)(nil), "mock.RepoRequest") } -func init() { proto.RegisterFile("mock.proto", fileDescriptor_6fa4806c90f7156d) } +func init() { proto.RegisterFile("praefect/mock/mock.proto", fileDescriptor_d20d83172fd49eb0) } -var fileDescriptor_6fa4806c90f7156d = []byte{ - // 279 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x90, 0x41, 0x4a, 0xc3, 0x40, - 0x14, 0x86, 0x99, 0x90, 0x96, 0xf0, 0xaa, 0xa5, 0x1d, 0x8b, 0x48, 0xdc, 0x48, 0x40, 0xc9, 0xa2, - 0x4c, 0xa1, 0x2e, 0x5d, 0x29, 0xc4, 0x9d, 0x9b, 0x14, 0x0f, 0x90, 0xc6, 0x67, 0x0c, 0x26, 0x7d, - 0xe3, 0xcc, 0xa4, 0x90, 0x93, 0xd4, 0x13, 0x79, 0x13, 0x2f, 0xd1, 0x95, 0x4c, 0x86, 0x60, 0xbb, - 0xed, 0xee, 0xbd, 0x7f, 0xbe, 0xf9, 0xe7, 0x9f, 0x1f, 0xa0, 0xa6, 0xfc, 0x53, 0x48, 0x45, 0x86, - 0xb8, 0x6f, 0xe7, 0xf0, 0x4c, 0x7f, 0x64, 0x0a, 0xdf, 0x9c, 0x16, 0x5e, 0x17, 0x44, 0x45, 0x85, - 0x8b, 0x6e, 0x5b, 0x37, 0xef, 0x0b, 0xac, 0xa5, 0x69, 0xdd, 0x61, 0x74, 0x0b, 0xe7, 0xab, 0xb2, - 0x96, 0x15, 0xa6, 0xf8, 0xd5, 0xa0, 0x36, 0x7c, 0x06, 0x83, 0x6d, 0x56, 0x35, 0x78, 0xc5, 0x6e, - 0x58, 0x3c, 0x48, 0xdd, 0x12, 0xdd, 0xc1, 0xb8, 0xc7, 0xb4, 0xa4, 0x8d, 0xc6, 0x7f, 0xce, 0x3b, - 0xe4, 0x1e, 0x60, 0x94, 0xa2, 0xa4, 0xde, 0x6c, 0x0e, 0xbe, 0x42, 0x49, 0x9d, 0xd7, 0x68, 0xc9, - 0x45, 0x51, 0x9a, 0xac, 0x6a, 0x85, 0x45, 0x74, 0x69, 0x48, 0xb5, 0x4f, 0xfe, 0xf7, 0xcf, 0x9c, - 0xa5, 0x1d, 0xb5, 0xfc, 0x65, 0x7d, 0x98, 0x15, 0xaa, 0x6d, 0x99, 0x23, 0x4f, 0x60, 0x6c, 0x47, - 0x54, 0x8f, 0x79, 0x8e, 0x5a, 0x93, 0xe2, 0x17, 0xa2, 0xfb, 0xed, 0x51, 0xe6, 0x70, 0x76, 0x2c, - 0xba, 0x84, 0x51, 0xb0, 0xdf, 0xc5, 0x7e, 0xe0, 0x4d, 0x18, 0x7f, 0x86, 0xa9, 0x7d, 0xb2, 0x37, - 0x79, 0xdd, 0x64, 0xaa, 0xe5, 0x53, 0x77, 0xe9, 0x20, 0x6e, 0x78, 0x29, 0x5c, 0x55, 0xa2, 0xaf, - 0x4a, 0x24, 0xb6, 0xaa, 0x68, 0xb8, 0xdf, 0xc5, 0x5e, 0xe0, 0xf1, 0x04, 0x26, 0x16, 0x7f, 0x69, - 0x4c, 0x66, 0x4e, 0xb6, 0x61, 0xeb, 0x61, 0xa7, 0xdf, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x6a, - 0x35, 0x84, 0xac, 0xb9, 0x01, 0x00, 0x00, +var fileDescriptor_d20d83172fd49eb0 = []byte{ + // 230 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0x28, 0x4a, 0x4c, + 0x4d, 0x4b, 0x4d, 0x2e, 0xd1, 0xcf, 0xcd, 0x4f, 0xce, 0x06,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2, 0x8d, 0x61, 0x4c, 0x62, 0x03, 0x8b, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x46, 0xa4, + 0xc0, 0xce, 0x3d, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -186,8 +102,6 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type SimpleServiceClient interface { - // ServerAccessor is a unary RPC that accesses a server - ServerAccessor(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) // RepoAccessorUnary is a unary RPC that accesses a repo RepoAccessorUnary(ctx context.Context, in *RepoRequest, opts ...grpc.CallOption) (*empty.Empty, error) // RepoMutatorUnary is a unary RPC that mutates a repo @@ -202,15 +116,6 @@ func NewSimpleServiceClient(cc *grpc.ClientConn) SimpleServiceClient { return &simpleServiceClient{cc} } -func (c *simpleServiceClient) ServerAccessor(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) { - out := new(SimpleResponse) - err := c.cc.Invoke(ctx, "/mock.SimpleService/ServerAccessor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *simpleServiceClient) RepoAccessorUnary(ctx context.Context, in *RepoRequest, opts ...grpc.CallOption) (*empty.Empty, error) { out := new(empty.Empty) err := c.cc.Invoke(ctx, "/mock.SimpleService/RepoAccessorUnary", in, out, opts...) @@ -231,8 +136,6 @@ func (c *simpleServiceClient) RepoMutatorUnary(ctx context.Context, in *RepoRequ // SimpleServiceServer is the server API for SimpleService service. type SimpleServiceServer interface { - // ServerAccessor is a unary RPC that accesses a server - ServerAccessor(context.Context, *SimpleRequest) (*SimpleResponse, error) // RepoAccessorUnary is a unary RPC that accesses a repo RepoAccessorUnary(context.Context, *RepoRequest) (*empty.Empty, error) // RepoMutatorUnary is a unary RPC that mutates a repo @@ -243,9 +146,6 @@ type SimpleServiceServer interface { type UnimplementedSimpleServiceServer struct { } -func (*UnimplementedSimpleServiceServer) ServerAccessor(ctx context.Context, req *SimpleRequest) (*SimpleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ServerAccessor not implemented") -} func (*UnimplementedSimpleServiceServer) RepoAccessorUnary(ctx context.Context, req *RepoRequest) (*empty.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method RepoAccessorUnary not implemented") } @@ -257,24 +157,6 @@ func RegisterSimpleServiceServer(s *grpc.Server, srv SimpleServiceServer) { s.RegisterService(&_SimpleService_serviceDesc, srv) } -func _SimpleService_ServerAccessor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SimpleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SimpleServiceServer).ServerAccessor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/mock.SimpleService/ServerAccessor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SimpleServiceServer).ServerAccessor(ctx, req.(*SimpleRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _SimpleService_RepoAccessorUnary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RepoRequest) if err := dec(in); err != nil { @@ -316,10 +198,6 @@ var _SimpleService_serviceDesc = grpc.ServiceDesc{ HandlerType: (*SimpleServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "ServerAccessor", - Handler: _SimpleService_ServerAccessor_Handler, - }, - { MethodName: "RepoAccessorUnary", Handler: _SimpleService_RepoAccessorUnary_Handler, }, @@ -329,5 +207,5 @@ var _SimpleService_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "mock.proto", + Metadata: "praefect/mock/mock.proto", } diff --git a/internal/praefect/mock/mock.proto b/internal/praefect/mock/mock.proto index 8aa159efa..282cba8e9 100644 --- a/internal/praefect/mock/mock.proto +++ b/internal/praefect/mock/mock.proto @@ -8,29 +8,14 @@ syntax = "proto3"; package mock; import "shared.proto"; +import "lint.proto"; import "google/protobuf/empty.proto"; -message SimpleRequest { - int32 value = 1; -} - -message SimpleResponse { - int32 value = 2; -} - message RepoRequest { gitaly.Repository repo = 1 [(gitaly.target_repository)=true]; } service SimpleService { - // ServerAccessor is a unary RPC that accesses a server - rpc ServerAccessor(SimpleRequest) returns (SimpleResponse) { - option (gitaly.op_type) = { - op: ACCESSOR - scope_level: SERVER - }; - } - // RepoAccessorUnary is a unary RPC that accesses a repo rpc RepoAccessorUnary(RepoRequest) returns (google.protobuf.Empty) { option (gitaly.op_type) = { @@ -38,7 +23,7 @@ service SimpleService { scope_level: REPOSITORY }; } - + // RepoMutatorUnary is a unary RPC that mutates a repo rpc RepoMutatorUnary(RepoRequest) returns (google.protobuf.Empty) { option (gitaly.op_type) = { diff --git a/internal/praefect/mocksvc_test.go b/internal/praefect/mocksvc_test.go index e7b1c1257..0a7a4e091 100644 --- a/internal/praefect/mocksvc_test.go +++ b/internal/praefect/mocksvc_test.go @@ -8,26 +8,17 @@ import ( ) type ( - serverAccessorFunc func(context.Context, *mock.SimpleRequest) (*mock.SimpleResponse, error) repoAccessorUnaryFunc func(context.Context, *mock.RepoRequest) (*empty.Empty, error) repoMutatorUnaryFunc func(context.Context, *mock.RepoRequest) (*empty.Empty, error) ) // mockSvc is an implementation of mock.SimpleServer for testing purposes. The -// gRPC stub can be updated via go generate: -// -//go:generate make mock/mock.pb.go +// gRPC stub can be updated by running `make proto`. type mockSvc struct { - serverAccessor serverAccessorFunc repoAccessorUnary repoAccessorUnaryFunc repoMutatorUnary repoMutatorUnaryFunc } -// ServerAccessor is implemented by a callback -func (m *mockSvc) ServerAccessor(ctx context.Context, req *mock.SimpleRequest) (*mock.SimpleResponse, error) { - return m.serverAccessor(ctx, req) -} - // RepoAccessorUnary is implemented by a callback func (m *mockSvc) RepoAccessorUnary(ctx context.Context, req *mock.RepoRequest) (*empty.Empty, error) { return m.repoAccessorUnary(ctx, req) diff --git a/internal/praefect/protoregistry/protoregistry.go b/internal/praefect/protoregistry/protoregistry.go index 2dd6870f4..3d6bf8699 100644 --- a/internal/praefect/protoregistry/protoregistry.go +++ b/internal/praefect/protoregistry/protoregistry.go @@ -64,14 +64,10 @@ const ( ScopeRepository Scope = iota // ScopeStorage indicates an RPC is scoped to an entire storage location ScopeStorage - // ScopeServer indicates an RPC is scoped to an entire server - ScopeServer ) func (s Scope) String() string { switch s { - case ScopeServer: - return "server" case ScopeStorage: return "storage" case ScopeRepository: @@ -82,7 +78,6 @@ func (s Scope) String() string { } var protoScope = map[gitalypb.OperationMsg_Scope]Scope{ - gitalypb.OperationMsg_SERVER: ScopeServer, gitalypb.OperationMsg_REPOSITORY: ScopeRepository, gitalypb.OperationMsg_STORAGE: ScopeStorage, } diff --git a/internal/praefect/server_test.go b/internal/praefect/server_test.go index 2e3a1bf42..cad10cc6b 100644 --- a/internal/praefect/server_test.go +++ b/internal/praefect/server_test.go @@ -827,46 +827,34 @@ func TestProxyWrites(t *testing.T) { assert.Equal(t, bytes.Repeat([]byte(payload), 10), receivedData.Bytes()) } -type errorSimpleService struct{} - -// ServerAccessor is implemented by a callback -func (m *errorSimpleService) ServerAccessor(ctx context.Context, req *mock.SimpleRequest) (*mock.SimpleResponse, error) { - return nil, helper.ErrInternalf("something went wrong") -} - -// RepoAccessorUnary is implemented by a callback -func (m *errorSimpleService) RepoAccessorUnary(ctx context.Context, req *mock.RepoRequest) (*empty.Empty, error) { - md, ok := grpc_metadata.FromIncomingContext(ctx) - if !ok { - return &empty.Empty{}, errors.New("couldn't read metadata") - } - - if md.Get("bad-header")[0] == "true" { - return &empty.Empty{}, helper.ErrInternalf("something went wrong") - } - - return &empty.Empty{}, nil -} - -// RepoMutatorUnary is implemented by a callback -func (m *errorSimpleService) RepoMutatorUnary(ctx context.Context, req *mock.RepoRequest) (*empty.Empty, error) { - md, ok := grpc_metadata.FromIncomingContext(ctx) - if !ok { - return &empty.Empty{}, errors.New("couldn't read metadata") - } +func TestErrorThreshold(t *testing.T) { + backendToken := "" + backend, cleanup := newMockDownstream(t, backendToken, &mockSvc{ + repoMutatorUnary: func(ctx context.Context, req *mock.RepoRequest) (*empty.Empty, error) { + md, ok := grpc_metadata.FromIncomingContext(ctx) + if !ok { + return &empty.Empty{}, errors.New("couldn't read metadata") + } - if md.Get("bad-header")[0] == "true" { - return &empty.Empty{}, helper.ErrInternalf("something went wrong") - } + if md.Get("bad-header")[0] == "true" { + return &empty.Empty{}, helper.ErrInternalf("something went wrong") + } - return &empty.Empty{}, nil -} + return &empty.Empty{}, nil + }, + repoAccessorUnary: func(ctx context.Context, req *mock.RepoRequest) (*empty.Empty, error) { + md, ok := grpc_metadata.FromIncomingContext(ctx) + if !ok { + return &empty.Empty{}, errors.New("couldn't read metadata") + } -func TestErrorThreshold(t *testing.T) { - simple := &errorSimpleService{} + if md.Get("bad-header")[0] == "true" { + return &empty.Empty{}, helper.ErrInternalf("something went wrong") + } - backendToken := "" - backend, cleanup := newMockDownstream(t, backendToken, simple) + return &empty.Empty{}, nil + }, + }) defer cleanup() conf := config.Config{ @@ -909,7 +897,7 @@ func TestErrorThreshold(t *testing.T) { }, } - gz := proto.FileDescriptor("mock.proto") + gz := proto.FileDescriptor("praefect/mock/mock.proto") fd, err := protoregistry.ExtractFileDescriptor(gz) require.NoError(t, err) diff --git a/proto/go/gitalypb/lint.pb.go b/proto/go/gitalypb/lint.pb.go index 8b843cf22..a8748caee 100644 --- a/proto/go/gitalypb/lint.pb.go +++ b/proto/go/gitalypb/lint.pb.go @@ -53,19 +53,16 @@ type OperationMsg_Scope int32 const ( OperationMsg_REPOSITORY OperationMsg_Scope = 0 - OperationMsg_SERVER OperationMsg_Scope = 1 OperationMsg_STORAGE OperationMsg_Scope = 2 ) var OperationMsg_Scope_name = map[int32]string{ 0: "REPOSITORY", - 1: "SERVER", 2: "STORAGE", } var OperationMsg_Scope_value = map[string]int32{ "REPOSITORY": 0, - "SERVER": 1, "STORAGE": 2, } @@ -197,32 +194,32 @@ func init() { func init() { proto.RegisterFile("lint.proto", fileDescriptor_1612d42a10b555ca) } var fileDescriptor_1612d42a10b555ca = []byte{ - // 425 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x41, 0x6b, 0xd4, 0x40, - 0x14, 0xc7, 0x9b, 0x40, 0x77, 0xeb, 0x4b, 0x29, 0x71, 0xa8, 0xb0, 0x14, 0xac, 0xcb, 0x9e, 0x7a, - 0x31, 0x29, 0xed, 0xc9, 0x78, 0x90, 0x75, 0x89, 0x22, 0x76, 0x77, 0x64, 0x92, 0x2a, 0x7a, 0x59, - 0xb2, 0xc9, 0x33, 0x0e, 0xc4, 0x7d, 0xc3, 0x64, 0x2c, 0xec, 0xd5, 0x4f, 0xe7, 0xd7, 0xb0, 0xfa, - 0x39, 0x54, 0x92, 0xd9, 0x6d, 0x16, 0x5a, 0x50, 0x6f, 0xf3, 0x1e, 0xff, 0xdf, 0x8f, 0xc7, 0x9f, - 0x01, 0xa8, 0xe4, 0xd2, 0x04, 0x4a, 0x93, 0x21, 0xd6, 0x2b, 0xa5, 0xc9, 0xaa, 0xd5, 0xd1, 0xb0, - 0x24, 0x2a, 0x2b, 0x0c, 0xdb, 0xed, 0xe2, 0xcb, 0xc7, 0xb0, 0xc0, 0x3a, 0xd7, 0x52, 0x19, 0xd2, - 0x36, 0x39, 0xba, 0x76, 0x60, 0x9f, 0x2b, 0xd4, 0x99, 0x91, 0xb4, 0x9c, 0xd6, 0x25, 0x0b, 0xc0, - 0x25, 0x35, 0x70, 0x86, 0xce, 0xc9, 0xc1, 0xd9, 0x71, 0x60, 0x3d, 0xc1, 0x76, 0xa2, 0x1b, 0x84, - 0x4b, 0x8a, 0x3d, 0x05, 0xaf, 0xce, 0x49, 0xe1, 0xbc, 0xc2, 0x2b,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0x86, 0xf4, 0xea, 0x6f, 0xf4, 0xf5, 0x9a, 0xde, 0x42, 0xa2, 0x0b, 0xb8, 0x6f, 0x32, 0x5d, 0xa2, - 0x99, 0xff, 0xbb, 0xe7, 0xc7, 0xda, 0xe3, 0x5b, 0x52, 0x74, 0xb6, 0x14, 0x1e, 0x64, 0x45, 0x21, - 0x9b, 0x58, 0x56, 0xfd, 0x87, 0xf1, 0xe7, 0xda, 0x78, 0xd8, 0xd1, 0x9d, 0xf5, 0xf9, 0xe9, 0x87, - 0xa6, 0xbe, 0x2a, 0x5b, 0x04, 0x39, 0x7d, 0x0e, 0xed, 0xf3, 0x31, 0xe9, 0x32, 0xb4, 0xa5, 0xda, - 0x4f, 0x1d, 0x96, 0xb4, 0x9e, 0xd5, 0x62, 0xd1, 0x6b, 0x57, 0xe7, 0x7f, 0x02, 0x00, 0x00, 0xff, - 0xff, 0xb2, 0x98, 0xf0, 0x1b, 0x0b, 0x03, 0x00, 0x00, + // 426 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xd1, 0x8a, 0xd3, 0x40, + 0x14, 0x86, 0x4d, 0x70, 0xdb, 0x7a, 0xba, 0x2c, 0x71, 0x58, 0xa1, 0x2c, 0xb8, 0x96, 0x5e, 0x2d, + 0x82, 0x89, 0x74, 0xaf, 0x8c, 0x17, 0x52, 0x4b, 0x14, 0x71, 0xdb, 0x91, 0x49, 0x56, 0xd1, 0x9b, + 0x92, 0x26, 0xc7, 0x38, 0x10, 0x7b, 0x86, 0xc9, 0xb8, 0xd0, 0x5b, 0x9f, 0xce, 0xd7, 0x50, 0xf7, + 0x39, 0x54, 0x92, 0x69, 0x37, 0x85, 0x5d, 0x50, 0xef, 0xe6, 0x1c, 0xfe, 0xef, 0xe3, 0xf0, 0x33, + 0x00, 0xa5, 0x5c, 0x19, 0x5f, 0x69, 0x32, 0xc4, 0x3a, 0x85, 0x34,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a4, 0x27, 0x76, 0xa9, 0x90, 0x43, 0x97, 0xd4, 0xc2, 0xac, 0x15, 0xb2, 0xe3, 0x6b, + 0x82, 0x19, 0x9a, 0x4f, 0x94, 0x6f, 0xf9, 0xdf, 0x0d, 0xdf, 0x1f, 0x1f, 0xde, 0x54, 0x84, 0xe8, + 0x90, 0x4a, 0xd6, 0x0a, 0xc3, 0x27, 0xd0, 0xad, 0x0c, 0xe9, 0xb4, 0x40, 0x76, 0xff, 0x9a, 0xf0, + 0x85, 0xc4, 0xf2, 0xca, 0xf7, 0xfd, 0x9b, 0xbd, 0x67, 0x9b, 0x0f, 0x9f, 0x01, 0x68, 0x54, 0x54, + 0x49, 0x43, 0x7a, 0xfd, 0x37, 0xfa, 0xc7, 0x86, 0xde, 0x41, 0xc2, 0x33, 0xb8, 0x6b, 0x52, 0x5d, + 0xa0, 0x59, 0xfc, 0xbb, 0xe7, 0xe7, 0xc6, 0xe3, 0x59, 0x52, 0xb4, 0xb6, 0x04, 0xee, 0xa5, 0x79, + 0x2e, 0xeb, 0x58, 0x5a, 0xfe, 0x87, 0xf1, 0x72, 0x63, 0x3c, 0x6c, 0xe9, 0xd6, 0xfa, 0xfc, 0xf1, + 0x87, 0xba, 0xbe, 0x32, 0x5d, 0xfa, 0x19, 0x7d, 0x0e, 0xec, 0xf3, 0x11, 0xe9, 0x22, 0xb0, 0xa5, + 0xda, 0x6f, 0x1d, 0x14, 0xb4, 0x99, 0xd5, 0x72, 0xd9, 0x69, 0x56, 0xa7, 0x7f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x80, 0x8b, 0x42, 0x14, 0x0d, 0x03, 0x00, 0x00, } diff --git a/proto/go/internal/linter/lint_test.go b/proto/go/internal/linter/lint_test.go index 16fab1c4e..0d4e0a129 100644 --- a/proto/go/internal/linter/lint_test.go +++ b/proto/go/internal/linter/lint_test.go @@ -28,7 +28,6 @@ func TestLintFile(t *testing.T) { formatError("go/internal/linter/testdata/invalid.proto", "InvalidService", "InvalidMethod0", errors.New("missing op_type extension")), formatError("go/internal/linter/testdata/invalid.proto", "InvalidService", "InvalidMethod1", errors.New("op set to UNKNOWN")), formatError("go/internal/linter/testdata/invalid.proto", "InvalidService", "InvalidMethod2", errors.New("unexpected count of target_repository fields 0, expected 1, found target_repository label at: []")), - formatError("go/internal/linter/testdata/invalid.proto", "InvalidService", "InvalidMethod3", errors.New("unexpected count of target_repository fields 1, expected 0, found target_repository label at: [InvalidMethodRequestWithRepo.destination]")), formatError("go/internal/linter/testdata/invalid.proto", "InvalidService", "InvalidMethod4", errors.New("unexpected count of target_repository fields 0, expected 1, found target_repository label at: []")), formatError("go/internal/linter/testdata/invalid.proto", "InvalidService", "InvalidMethod5", errors.New("wrong type of field RequestWithWrongTypeRepository.header.repository, expected .gitaly.Repository, got .test.InvalidMethodResponse")), formatError("go/internal/linter/testdata/invalid.proto", "InvalidService", "InvalidMethod6", errors.New("unexpected count of target_repository fields 0, expected 1, found target_repository label at: []")), @@ -37,7 +36,6 @@ func TestLintFile(t *testing.T) { formatError("go/internal/linter/testdata/invalid.proto", "InvalidService", "InvalidMethod9", errors.New("unexpected count of target_repository fields 1, expected 0, found target_repository label at: [InvalidMethodRequestWithRepo.destination]")), formatError("go/internal/linter/testdata/invalid.proto", "InvalidService", "InvalidMethod10", errors.New("unexpected count of storage field 1, expected 0, found storage label at: [RequestWithStorageAndRepo.storage_name]")), formatError("go/internal/linter/testdata/invalid.proto", "InvalidService", "InvalidMethod11", errors.New("unexpected count of storage field 1, expected 0, found storage label at: [RequestWithNestedStorageAndRepo.inner_message.storage_name]")), - formatError("go/internal/linter/testdata/invalid.proto", "InvalidService", "InvalidMethod12", errors.New("unexpected count of storage field 1, expected 0, found storage label at: [RequestWithInnerNestedStorage.header.storage_name]")), formatError("go/internal/linter/testdata/invalid.proto", "InvalidService", "InvalidMethod13", errors.New("unexpected count of storage field 0, expected 1, found storage label at: []")), formatError("go/internal/linter/testdata/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]")), }, diff --git a/proto/go/internal/linter/method.go b/proto/go/internal/linter/method.go index 30f78e1b3..ae8b727f1 100644 --- a/proto/go/internal/linter/method.go +++ b/proto/go/internal/linter/method.go @@ -40,9 +40,6 @@ func (ml methodLinter) validateMutator() error { case gitalypb.OperationMsg_REPOSITORY: return ml.ensureValidRepoScope() - case gitalypb.OperationMsg_SERVER: - return ml.ensureValidServerScope() - case gitalypb.OperationMsg_STORAGE: return ml.ensureValidStorageScope() @@ -60,13 +57,6 @@ func (ml methodLinter) ensureValidStorageScope() error { return ml.ensureValidStorage(1) } -func (ml methodLinter) ensureValidServerScope() error { - if err := ml.ensureValidTargetRepository(0); err != nil { - return err - } - return ml.ensureValidStorage(0) -} - func (ml methodLinter) ensureValidRepoScope() error { if err := ml.ensureValidTargetRepository(1); err != nil { return err diff --git a/proto/go/internal/linter/testdata/invalid.pb.go b/proto/go/internal/linter/testdata/invalid.pb.go index 5a0b4a515..ae2144b29 100644 --- a/proto/go/internal/linter/testdata/invalid.pb.go +++ b/proto/go/internal/linter/testdata/invalid.pb.go @@ -643,53 +643,52 @@ func init() { } var fileDescriptor_506a53e91b227711 = []byte{ - // 726 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x5b, 0x4f, 0xd4, 0x40, - 0x14, 0xc7, 0x9d, 0xcd, 0xba, 0x81, 0x03, 0x78, 0x99, 0xa8, 0xe0, 0x7a, 0x81, 0x14, 0x2f, 0xab, - 0x92, 0x5d, 0x28, 0xa8, 0x48, 0xf0, 0x81, 0x8d, 0x31, 0x22, 0x61, 0xd5, 0x85, 0x84, 0xc4, 0x4b, - 0x70, 0xa4, 0x27, 0xdd, 0x26, 0xa5, 0xad, 0xd3, 0x01, 0xb3, 0x6f, 0x3e, 0x1a, 0x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0, 0xce, 0x1d, - 0x97, 0x97, 0x64, 0x78, 0xef, 0xd2, 0x6b, 0x2a, 0x5d, 0xa7, 0x26, 0xfe, 0x5a, 0x12, 0xbf, 0x47, - 0xaf, 0x2b, 0xb5, 0x85, 0x9a, 0x7a, 0x4b, 0x52, 0xbf, 0x4f, 0x8b, 0x26, 0xa2, 0x9a, 0x9e, 0xec, - 0xee, 0xbc, 0xe4, 0x6e, 0x6a, 0x28, 0x1f, 0xcd, 0xdd, 0x07, 0xff, 0xef, 0x36, 0x94, 0xe8, 0x06, - 0x9c, 0x4e, 0x37, 0xc4, 0x34, 0xfd, 0xdb, 0xe4, 0x52, 0xbb, 0xc3, 0x6f, 0x64, 0xe1, 0x99, 0xc2, - 0x73, 0xfb, 0x77, 0x79, 0x92, 0x95, 0xd7, 0xe9, 0xa4, 0xc2, 0x0c, 0x52, 0x6f, 0x12, 0x49, 0x7e, - 0xf6, 0x88, 0xf7, 0xe2, 0xc0, 0xe9, 0xb7, 0xb2, 0xe4, 0x1c, 0xbd, 0x91, 0x21, 0xce, 0x9d, 0xfb, - 0x8a, 0x15, 0xde, 0x55, 0xc2, 0x1f, 0xd9, 0xd9, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x88, - 0xa5, 0x4d, 0x15, 0x0b, 0x00, 0x00, + // 711 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x5b, 0x4f, 0xd4, 0x40, + 0x14, 0xc7, 0xed, 0x66, 0xdd, 0x2c, 0x07, 0xf0, 0x32, 0x51, 0xc1, 0xf5, 0x02, 0xa9, 0xb7, 0x55, + 0x49, 0x17, 0x16, 0x54, 0x24, 0xf8, 0xc0, 0xc6, 0x18, 0x91, 0xb0, 0xea, 0x42, 0x42, 0xe2, 0x25, + 0x38, 0xd2, 0x93, 0x6e, 0x93, 0xd2, 0xd6, 0x99, 0x01, 0xb3, 0x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a1, 0x93, 0x5b, + 0x4c, 0xbd, 0x2d, 0xa9, 0x3f, 0x20, 0x79, 0x97, 0x56, 0x31, 0x3d, 0xd9, 0xdd, 0x79, 0xc9, 0xdd, + 0xd4, 0xbd, 0x79, 0x34, 0x77, 0x1f, 0x12, 0x3d, 0xbf, 0x61, 0xfd, 0x3f, 0x87, 0xc3, 0xa5, 0xab, + 0xfb, 0x7b, 0xf5, 0x72, 0x55, 0x3b, 0x53, 0x22, 0x1b, 0x70, 0x3a, 0x7d, 0x66, 0xa7, 0xc9, 0xbf, + 0x2e, 0x97, 0x62, 0xc7, 0xec, 0xad, 0x2c, 0x3c, 0x93, 0xdb, 0xb7, 0xff, 0x97, 0x0f, 0x7c, 0x96, + 0xe4, 0x67, 0x8f, 0xd8, 0xb8, 0x03, 0x2b, 0xde, 0xc9, 0x92, 0x73, 0xe4, 0x66, 0x86, 0x58, 0x79, + 0x77, 0x16, 0xac, 0xf0, 0xbe, 0x12, 0xfe, 0x0c, 0xce, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x76, + 0x6b, 0x7b, 0x04, 0x59, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -784,8 +783,6 @@ type InvalidServiceClient interface { InvalidMethod1(ctx context.Context, in *InvalidMethodRequest, opts ...grpc.CallOption) (*InvalidMethodResponse, error) // should fail if target repo is not provided for accessor InvalidMethod2(ctx context.Context, in *InvalidMethodRequest, opts ...grpc.CallOption) (*InvalidMethodResponse, error) - // should fail if target repo is provided for server-scoped mutator - InvalidMethod3(ctx context.Context, in *InvalidMethodRequestWithRepo, opts ...grpc.CallOption) (*InvalidMethodResponse, error) // should fail if missing either target repo or non-repo-scope for mutator InvalidMethod4(ctx context.Context, in *InvalidMethodRequest, opts ...grpc.CallOption) (*InvalidMethodResponse, error) // should fail if repository is not of type Repository @@ -802,8 +799,6 @@ type InvalidServiceClient interface { InvalidMethod10(ctx context.Context, in *RequestWithStorageAndRepo, opts ...grpc.CallOption) (*InvalidMethodResponse, error) // should fail if storage is specified for repository scoped RPC InvalidMethod11(ctx context.Context, in *RequestWithNestedStorageAndRepo, opts ...grpc.CallOption) (*InvalidMethodResponse, error) - // should fail if storage is specified for server scoped RPC - InvalidMethod12(ctx context.Context, in *RequestWithInnerNestedStorage, opts ...grpc.CallOption) (*InvalidMethodResponse, error) // should fail if storage isn't specified for storage scoped RPC InvalidMethod13(ctx context.Context, in *InvalidTargetType, opts ...grpc.CallOption) (*InvalidMethodResponse, error) // should fail if multiple storage is specified for storage scoped RPC @@ -845,15 +840,6 @@ func (c *invalidServiceClient) InvalidMethod2(ctx context.Context, in *InvalidMe return out, nil } -func (c *invalidServiceClient) InvalidMethod3(ctx context.Context, in *InvalidMethodRequestWithRepo, opts ...grpc.CallOption) (*InvalidMethodResponse, error) { - out := new(InvalidMethodResponse) - err := c.cc.Invoke(ctx, "/test.InvalidService/InvalidMethod3", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *invalidServiceClient) InvalidMethod4(ctx context.Context, in *InvalidMethodRequest, opts ...grpc.CallOption) (*InvalidMethodResponse, error) { out := new(InvalidMethodResponse) err := c.cc.Invoke(ctx, "/test.InvalidService/InvalidMethod4", in, out, opts...) @@ -926,15 +912,6 @@ func (c *invalidServiceClient) InvalidMethod11(ctx context.Context, in *RequestW return out, nil } -func (c *invalidServiceClient) InvalidMethod12(ctx context.Context, in *RequestWithInnerNestedStorage, opts ...grpc.CallOption) (*InvalidMethodResponse, error) { - out := new(InvalidMethodResponse) - err := c.cc.Invoke(ctx, "/test.InvalidService/InvalidMethod12", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *invalidServiceClient) InvalidMethod13(ctx context.Context, in *InvalidTargetType, opts ...grpc.CallOption) (*InvalidMethodResponse, error) { out := new(InvalidMethodResponse) err := c.cc.Invoke(ctx, "/test.InvalidService/InvalidMethod13", in, out, opts...) @@ -961,8 +938,6 @@ type InvalidServiceServer interface { InvalidMethod1(context.Context, *InvalidMethodRequest) (*InvalidMethodResponse, error) // should fail if target repo is not provided for accessor InvalidMethod2(context.Context, *InvalidMethodRequest) (*InvalidMethodResponse, error) - // should fail if target repo is provided for server-scoped mutator - InvalidMethod3(context.Context, *InvalidMethodRequestWithRepo) (*InvalidMethodResponse, error) // should fail if missing either target repo or non-repo-scope for mutator InvalidMethod4(context.Context, *InvalidMethodRequest) (*InvalidMethodResponse, error) // should fail if repository is not of type Repository @@ -979,8 +954,6 @@ type InvalidServiceServer interface { InvalidMethod10(context.Context, *RequestWithStorageAndRepo) (*InvalidMethodResponse, error) // should fail if storage is specified for repository scoped RPC InvalidMethod11(context.Context, *RequestWithNestedStorageAndRepo) (*InvalidMethodResponse, error) - // should fail if storage is specified for server scoped RPC - InvalidMethod12(context.Context, *RequestWithInnerNestedStorage) (*InvalidMethodResponse, error) // should fail if storage isn't specified for storage scoped RPC InvalidMethod13(context.Context, *InvalidTargetType) (*InvalidMethodResponse, error) // should fail if multiple storage is specified for storage scoped RPC @@ -1000,9 +973,6 @@ func (*UnimplementedInvalidServiceServer) InvalidMethod1(ctx context.Context, re func (*UnimplementedInvalidServiceServer) InvalidMethod2(ctx context.Context, req *InvalidMethodRequest) (*InvalidMethodResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InvalidMethod2 not implemented") } -func (*UnimplementedInvalidServiceServer) InvalidMethod3(ctx context.Context, req *InvalidMethodRequestWithRepo) (*InvalidMethodResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method InvalidMethod3 not implemented") -} func (*UnimplementedInvalidServiceServer) InvalidMethod4(ctx context.Context, req *InvalidMethodRequest) (*InvalidMethodResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InvalidMethod4 not implemented") } @@ -1027,9 +997,6 @@ func (*UnimplementedInvalidServiceServer) InvalidMethod10(ctx context.Context, r func (*UnimplementedInvalidServiceServer) InvalidMethod11(ctx context.Context, req *RequestWithNestedStorageAndRepo) (*InvalidMethodResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InvalidMethod11 not implemented") } -func (*UnimplementedInvalidServiceServer) InvalidMethod12(ctx context.Context, req *RequestWithInnerNestedStorage) (*InvalidMethodResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method InvalidMethod12 not implemented") -} func (*UnimplementedInvalidServiceServer) InvalidMethod13(ctx context.Context, req *InvalidTargetType) (*InvalidMethodResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InvalidMethod13 not implemented") } @@ -1095,24 +1062,6 @@ func _InvalidService_InvalidMethod2_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } -func _InvalidService_InvalidMethod3_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InvalidMethodRequestWithRepo) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(InvalidServiceServer).InvalidMethod3(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/test.InvalidService/InvalidMethod3", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InvalidServiceServer).InvalidMethod3(ctx, req.(*InvalidMethodRequestWithRepo)) - } - return interceptor(ctx, in, info, handler) -} - func _InvalidService_InvalidMethod4_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(InvalidMethodRequest) if err := dec(in); err != nil { @@ -1257,24 +1206,6 @@ func _InvalidService_InvalidMethod11_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } -func _InvalidService_InvalidMethod12_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestWithInnerNestedStorage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(InvalidServiceServer).InvalidMethod12(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/test.InvalidService/InvalidMethod12", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InvalidServiceServer).InvalidMethod12(ctx, req.(*RequestWithInnerNestedStorage)) - } - return interceptor(ctx, in, info, handler) -} - func _InvalidService_InvalidMethod13_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(InvalidTargetType) if err := dec(in); err != nil { @@ -1328,10 +1259,6 @@ var _InvalidService_serviceDesc = grpc.ServiceDesc{ Handler: _InvalidService_InvalidMethod2_Handler, }, { - MethodName: "InvalidMethod3", - Handler: _InvalidService_InvalidMethod3_Handler, - }, - { MethodName: "InvalidMethod4", Handler: _InvalidService_InvalidMethod4_Handler, }, @@ -1364,10 +1291,6 @@ var _InvalidService_serviceDesc = grpc.ServiceDesc{ Handler: _InvalidService_InvalidMethod11_Handler, }, { - MethodName: "InvalidMethod12", - Handler: _InvalidService_InvalidMethod12_Handler, - }, - { MethodName: "InvalidMethod13", Handler: _InvalidService_InvalidMethod13_Handler, }, diff --git a/proto/go/internal/linter/testdata/invalid.proto b/proto/go/internal/linter/testdata/invalid.proto index 9647b00f3..fb3658540 100644 --- a/proto/go/internal/linter/testdata/invalid.proto +++ b/proto/go/internal/linter/testdata/invalid.proto @@ -89,13 +89,6 @@ service InvalidService { op: ACCESSOR }; } - // should fail if target repo is provided for server-scoped mutator - rpc InvalidMethod3(InvalidMethodRequestWithRepo) returns (InvalidMethodResponse) { - option (gitaly.op_type) = { - op: MUTATOR - scope_level: SERVER - }; - } // should fail if missing either target repo or non-repo-scope for mutator rpc InvalidMethod4(InvalidMethodRequest) returns (InvalidMethodResponse) { option (gitaly.op_type).op = MUTATOR; @@ -146,14 +139,6 @@ service InvalidService { }; } - // should fail if storage is specified for server scoped RPC - rpc InvalidMethod12(RequestWithInnerNestedStorage) returns (InvalidMethodResponse) { - option (gitaly.op_type) = { - op: MUTATOR - scope_level: SERVER - }; - } - // should fail if storage isn't specified for storage scoped RPC rpc InvalidMethod13(InvalidTargetType) returns (InvalidMethodResponse) { option (gitaly.op_type) = { diff --git a/proto/go/internal/linter/testdata/valid.pb.go b/proto/go/internal/linter/testdata/valid.pb.go index 2402fa89f..371b007b2 100644 --- a/proto/go/internal/linter/testdata/valid.pb.go +++ b/proto/go/internal/linter/testdata/valid.pb.go @@ -457,42 +457,41 @@ func init() { } var fileDescriptor_7058768ff0db2cf7 = []byte{ - // 545 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0x86, 0xe5, 0x28, 0x44, 0x61, 0x92, 0x8a, 0x6a, 0x7b, 0x20, 0x89, 0x44, 0x41, 0x16, 0x52, - 0x23, 0x81, 0x12, 0x91, 0x52, 0x0a, 0x08, 0x72, 0x28, 0x15, 0x90, 0xa2, 0x14, 0x70, 0x2b, 0x38, - 0x70, 0x88, 0x36, 0xf1, 0xc8, 0x31, 0x72, 0xbc, 0x66, 0x77, 0x5a, 0xa9, 0x6f, 0xc0, 0x8d, 0x63, - 0x7a, 0xe1, 0x75, 0x78, 0x1e, 0xce, 0x3d, 0x21, 0xaf, 0x9d, 0xb0, 0x8e, 0x43, 0x68, 0xe1, 0x66, - 0xcd, 0xce, 0xff, 0xed, 0xef, 0xdf, 0x33, 0x86, 0x2d, 0x4f, 0xb4, 0xfd, 0x90, 0x50, 0x86, 0x3c, - 0x68, 0x07, 0xfa, 0xa9, 0x4d, 0xa8, 0xc8, 0xe5, 0xc4, 0xdb, 0xa7, 0x3c, 0xf0, 0xdd, 0x56, 0x24, - 0x05, 0x09, 0x56, 0x8c, 0xab, 0x0d, 0x88, 0x5b, 0x92, 0x4a, 0xa3, 0xaa, 0xc6, 0x5c, 0x62, 0x7a, - 0x6e, 0x1f, 0x40, 0xf5, 0x43, 0xdc, 0xee, 0xe0, 0x97, 0x13, 0x54, 0xc4, 0x9e, 0x42, 0xc5, 0x45, - 0x45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0x1e, 0xb3, 0x3f, 0xff, 0x23, 0x56, 0xa7, - 0x54, 0x60, 0x7d, 0x13, 0xf4, 0x84, 0xdd, 0xce, 0x83, 0x2e, 0xe1, 0x6a, 0x8e, 0x1b, 0x96, 0xf4, - 0xef, 0x7e, 0xfb, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x24, 0x44, 0x9b, 0x39, 0x06, 0x00, - 0x00, + // 532 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xc1, 0x6e, 0xd3, 0x4e, + 0x10, 0xc6, 0xe5, 0xc8, 0x8a, 0xf2, 0x9f, 0xa4, 0xfa, 0x57, 0xdb, 0x03, 0x49, 0x24, 0x0a, 0xb2, + 0x90, 0x1a, 0x09, 0xe4, 0x88, 0x54, 0xa5, 0x80, 0x20, 0x87, 0x52, 0x01, 0xa9, 0x94, 0x02, 0x6e, + 0x05, 0x07, 0x0e, 0xd1, 0x26, 0x1e, 0x39, 0x46, 0x8e, 0xd7, 0xec, 0x4e, 0x2b, 0xf5, 0x0d, 0x78, + 0x83, 0xf4, 0xc2, 0xcb, 0x70, 0xe0, 0x79, 0x38, 0xf7, 0x84, 0xbc, 0x76, 0xc2, 0x3a, 0x09, 0xa1, + 0x85, 0x5b, 0x34, 0x3b, 0xdf, 0x6f, 0xbf, 0x7c, 0x3b, 0x63, 0xd8, 0x09, 0x44, 0x3b, 0x8c, 0x09, + 0x65, 0xcc, 0xa3, 0x76, 0xa4, 0x7f, 0xb5, 0x09, 0x15, 0xf9, 0x9c, 0x78, 0xfb, 0x9c, 0x47, 0xa1, + 0xef, 0x26, 0x52, 0x90, 0x60, 0x76, 0x5a, 0x6d, 0x42, 0xda, 0x92, 0x55, 0x9a, 0x35, 0x35, 0xe6, + 0x12, 0xf3, 0x73, 0xe7, 0x08, 0x6a, 0xef, 0xd3, 0x76, 0x0f, 0x3f, 0x9f, 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0xbb, 0xb3, 0x0c, 0xba, 0x86, 0xab, 0x39, + 0x6e, 0x58, 0xd6, 0x5f, 0xe8, 0xdd, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x23, 0x7b, 0xb9, 0x87, + 0xec, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -582,7 +581,6 @@ type ValidServiceClient interface { TestMethod(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error) TestMethod2(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error) TestMethod3(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error) - TestMethod4(ctx context.Context, in *ValidRequestWithoutRepo, opts ...grpc.CallOption) (*ValidResponse, error) TestMethod5(ctx context.Context, in *ValidNestedRequest, opts ...grpc.CallOption) (*ValidResponse, error) TestMethod6(ctx context.Context, in *ValidNestedSharedRequest, opts ...grpc.CallOption) (*ValidResponse, error) TestMethod7(ctx context.Context, in *ValidInnerNestedRequest, opts ...grpc.CallOption) (*ValidResponse, error) @@ -625,15 +623,6 @@ func (c *validServiceClient) TestMethod3(ctx context.Context, in *ValidRequest, return out, nil } -func (c *validServiceClient) TestMethod4(ctx context.Context, in *ValidRequestWithoutRepo, opts ...grpc.CallOption) (*ValidResponse, error) { - out := new(ValidResponse) - err := c.cc.Invoke(ctx, "/test.ValidService/TestMethod4", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *validServiceClient) TestMethod5(ctx context.Context, in *ValidNestedRequest, opts ...grpc.CallOption) (*ValidResponse, error) { out := new(ValidResponse) err := c.cc.Invoke(ctx, "/test.ValidService/TestMethod5", in, out, opts...) @@ -684,7 +673,6 @@ type ValidServiceServer interface { TestMethod(context.Context, *ValidRequest) (*ValidResponse, error) TestMethod2(context.Context, *ValidRequest) (*ValidResponse, error) TestMethod3(context.Context, *ValidRequest) (*ValidResponse, error) - TestMethod4(context.Context, *ValidRequestWithoutRepo) (*ValidResponse, error) TestMethod5(context.Context, *ValidNestedRequest) (*ValidResponse, error) TestMethod6(context.Context, *ValidNestedSharedRequest) (*ValidResponse, error) TestMethod7(context.Context, *ValidInnerNestedRequest) (*ValidResponse, error) @@ -705,9 +693,6 @@ func (*UnimplementedValidServiceServer) TestMethod2(ctx context.Context, req *Va func (*UnimplementedValidServiceServer) TestMethod3(ctx context.Context, req *ValidRequest) (*ValidResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestMethod3 not implemented") } -func (*UnimplementedValidServiceServer) TestMethod4(ctx context.Context, req *ValidRequestWithoutRepo) (*ValidResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TestMethod4 not implemented") -} func (*UnimplementedValidServiceServer) TestMethod5(ctx context.Context, req *ValidNestedRequest) (*ValidResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestMethod5 not implemented") } @@ -782,24 +767,6 @@ func _ValidService_TestMethod3_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _ValidService_TestMethod4_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidRequestWithoutRepo) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ValidServiceServer).TestMethod4(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/test.ValidService/TestMethod4", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ValidServiceServer).TestMethod4(ctx, req.(*ValidRequestWithoutRepo)) - } - return interceptor(ctx, in, info, handler) -} - func _ValidService_TestMethod5_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ValidNestedRequest) if err := dec(in); err != nil { @@ -907,10 +874,6 @@ var _ValidService_serviceDesc = grpc.ServiceDesc{ Handler: _ValidService_TestMethod3_Handler, }, { - MethodName: "TestMethod4", - Handler: _ValidService_TestMethod4_Handler, - }, - { MethodName: "TestMethod5", Handler: _ValidService_TestMethod5_Handler, }, diff --git a/proto/go/internal/linter/testdata/valid.proto b/proto/go/internal/linter/testdata/valid.proto index 05ac3bcb0..0845fe159 100644 --- a/proto/go/internal/linter/testdata/valid.proto +++ b/proto/go/internal/linter/testdata/valid.proto @@ -74,13 +74,6 @@ service ValidService { }; } - rpc TestMethod4(ValidRequestWithoutRepo) returns (ValidResponse) { - option (gitaly.op_type) = { - op: MUTATOR - scope_level: SERVER - }; - } - rpc TestMethod5(ValidNestedRequest) returns (ValidResponse) { option (gitaly.op_type) = { op: MUTATOR diff --git a/proto/lint.proto b/proto/lint.proto index 94395a94c..66d851ad5 100644 --- a/proto/lint.proto +++ b/proto/lint.proto @@ -17,8 +17,10 @@ message OperationMsg { enum Scope { REPOSITORY = 0; - SERVER = 1; STORAGE = 2; + + reserved 1; + reserved "SERVER"; } // Scope level indicates what level an RPC interacts with a server: diff --git a/ruby/proto/gitaly/lint_pb.rb b/ruby/proto/gitaly/lint_pb.rb index 3d922340d..8963e5340 100644 --- a/ruby/proto/gitaly/lint_pb.rb +++ b/ruby/proto/gitaly/lint_pb.rb @@ -16,7 +16,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do end add_enum "gitaly.OperationMsg.Scope" do value :REPOSITORY, 0 - value :SERVER, 1 value :STORAGE, 2 end end |