Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Cai <jcai@gitlab.com>2020-02-19 21:05:52 +0300
committerJohn Cai <jcai@gitlab.com>2020-02-25 18:35:42 +0300
commitfd1385816f5a514d8455733c8ae6f96983c41cfd (patch)
tree7be24686b0a37008b8696f785f3afd8746232bd3
parent2666cd4f229563a44606b90750fc7c1ce4c431cd (diff)
Add FetchInternalRemoteErrorOnFailure as an RPC that throws an error when the result is falsejc-fetch_remote_error_on_failure
-rw-r--r--changelogs/unreleased/jc-fetch_remote_error_on_failure.yml6
-rw-r--r--internal/service/remote/fetch_internal_remote.go13
-rw-r--r--internal/service/remote/fetch_internal_remote_test.go28
-rw-r--r--proto/go/gitalypb/remote.pb.go135
-rw-r--r--proto/remote.proto5
-rw-r--r--ruby/proto/gitaly/remote_services_pb.rb1
6 files changed, 139 insertions, 49 deletions
diff --git a/changelogs/unreleased/jc-fetch_remote_error_on_failure.yml b/changelogs/unreleased/jc-fetch_remote_error_on_failure.yml
new file mode 100644
index 000000000..bbda44646
--- /dev/null
+++ b/changelogs/unreleased/jc-fetch_remote_error_on_failure.yml
@@ -0,0 +1,6 @@
+---
+title: Add FetchInternalRemoteErrorOnFailure as an RPC that throws an error when the
+ result is false
+merge_request: 1848
+author:
+type: changed
diff --git a/internal/service/remote/fetch_internal_remote.go b/internal/service/remote/fetch_internal_remote.go
index c8eaed507..fc61d7b82 100644
--- a/internal/service/remote/fetch_internal_remote.go
+++ b/internal/service/remote/fetch_internal_remote.go
@@ -2,8 +2,10 @@ package remote
import (
"context"
+ "errors"
"fmt"
+ "gitlab.com/gitlab-org/gitaly/internal/helper"
"gitlab.com/gitlab-org/gitaly/internal/rubyserver"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"google.golang.org/grpc/codes"
@@ -40,3 +42,14 @@ func validateFetchInternalRemoteRequest(req *gitalypb.FetchInternalRemoteRequest
return nil
}
+
+// FetchInternalRemoteErrorOnFailure fetches another Gitaly repository set as a remote
+func (s *server) FetchInternalRemoteErrorOnFailure(ctx context.Context, req *gitalypb.FetchInternalRemoteRequest) (*gitalypb.FetchInternalRemoteResponse, error) {
+ resp, err := s.FetchInternalRemote(ctx, req)
+
+ if !resp.Result {
+ return nil, helper.ErrInternal(errors.New("fetch failed"))
+ }
+
+ return resp, err
+}
diff --git a/internal/service/remote/fetch_internal_remote_test.go b/internal/service/remote/fetch_internal_remote_test.go
index e752bffb3..e5236b253 100644
--- a/internal/service/remote/fetch_internal_remote_test.go
+++ b/internal/service/remote/fetch_internal_remote_test.go
@@ -77,6 +77,34 @@ func TestFailedFetchInternalRemote(t *testing.T) {
require.False(t, c.GetResult())
}
+func TestFailedFetchInternalRemoteOnError(t *testing.T) {
+ server, serverSocketPath := runFullServer(t)
+ defer server.Stop()
+
+ client, conn := remote.NewRemoteClient(t, serverSocketPath)
+ defer conn.Close()
+
+ repo, _, cleanupFn := testhelper.InitBareRepo(t)
+ defer cleanupFn()
+
+ ctxOuter, cancel := testhelper.Context()
+ defer cancel()
+
+ md := testhelper.GitalyServersMetadata(t, serverSocketPath)
+ ctx := metadata.NewOutgoingContext(ctxOuter, md)
+
+ // Non-existing remote repo
+ remoteRepo := &gitalypb.Repository{StorageName: "default", RelativePath: "fake.git"}
+
+ request := &gitalypb.FetchInternalRemoteRequest{
+ Repository: repo,
+ RemoteRepository: remoteRepo,
+ }
+
+ _, err := client.FetchInternalRemoteErrorOnFailure(ctx, request)
+ require.Error(t, err)
+}
+
func TestFailedFetchInternalRemoteDueToValidations(t *testing.T) {
server, serverSocketPath := runFullServer(t)
defer server.Stop()
diff --git a/proto/go/gitalypb/remote.pb.go b/proto/go/gitalypb/remote.pb.go
index 35119836a..96bef27fa 100644
--- a/proto/go/gitalypb/remote.pb.go
+++ b/proto/go/gitalypb/remote.pb.go
@@ -721,55 +721,56 @@ func init() {
func init() { proto.RegisterFile("remote.proto", fileDescriptor_eefc82927d57d89b) }
var fileDescriptor_eefc82927d57d89b = []byte{
- // 753 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xc9, 0x6e, 0xd3, 0x40,
- 0x18, 0x96, 0x93, 0x34, 0xcb, 0x9f, 0x14, 0x25, 0x93, 0xaa, 0x38, 0x4e, 0x25, 0x52, 0x03, 0x92,
- 0x0f, 0x34, 0xa9, 0xca, 0x22, 0x0e, 0x48, 0x88, 0x0a, 0xa1, 0xb2, 0xb4, 0x02, 0x43, 0x2f, 0x5c,
- 0x8c, 0x93, 0x8c, 0x63, 0x2b, 0x8e, 0xc7, 0xcc, 0x38, 0x85, 0xbc, 0x05, 0xb7, 0x72, 0xe0, 0x05,
- 0xb8, 0xf0, 0x18, 0x3c, 0x54, 0x4f, 0x68, 0x3c, 0xe3, 0xc4, 0x69, 0x9d, 0x70, 0x28, 0xdc, 0x3c,
- 0xdf, 0xbf, 0x7d, 0xff, 0x2a, 0x43, 0x8d, 0xe2, 0x09, 0x89, 0x70, 0x37, 0xa4, 0x24, 0x22, 0xa8,
- 0x38, 0xf2, 0x22, 0xdb, 0x9f, 0x69, 0x35, 0xe6, 0xda, 0x14, 0x0f, 0x05, 0xaa, 0xff, 0x52, 0xa0,
- 0xfe, 0x6c, 0x38, 0x34, 0x63, 0x4d, 0x13, 0x7f, 0x9e, 0x62, 0x16, 0xa1, 0xc7, 0x00, 0x14, 0x87,
- 0x84, 0x79, 0x11, 0xa1, 0x33, 0x55, 0xe9, 0x28, 0x46, 0xf5, 0x00, 0x75, 0x85, 0x7d, 0xd7, 0x9c,
- 0x4b, 0x0e, 0x0b, 0xdf, 0x7f, 0xdf, 0x53, 0xcc, 0x94, 0x2e, 0x42, 0x50, 0x08, 0xec, 0x09, 0x56,
- 0x73, 0x1d, 0xc5, 0xa8, 0x98, 0xf1, 0x37, 0xaa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0x34, 0x2f, 0x7f, 0x39,
+ 0x33, 0xe8, 0x77, 0x56, 0x2b, 0xc9, 0x60, 0x85, 0xf3, 0x33, 0x33, 0x57, 0xc8, 0x54, 0x14, 0xf4,
+ 0x19, 0xaa, 0x97, 0x6e, 0x11, 0x35, 0x53, 0x9c, 0x2c, 0x90, 0x82, 0xbe, 0xbd, 0x42, 0x63, 0xa1,
+ 0xa0, 0x0c, 0x7a, 0x07, 0xa5, 0xc4, 0xfd, 0x20, 0x3d, 0xf5, 0xa8, 0x84, 0xd7, 0xc6, 0x8a, 0x83,
+ 0x8b, 0xfd, 0xed, 0x2a, 0xfb, 0xbb, 0x9f, 0xb8, 0x9e, 0xe7, 0x74, 0x5a, 0x5d, 0x32, 0x6e, 0x8b,
+ 0xcf, 0x1d, 0x42, 0x07, 0x6d, 0x61, 0xdd, 0x8e, 0xfe, 0x4f, 0xda, 0x03, 0x22, 0xdf, 0x41, 0xa7,
+ 0xa3, 0x46, 0xd0, 0xfd, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9d, 0x09, 0x48, 0x95, 0xd8, 0x08,
+ 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -786,6 +787,7 @@ const _ = grpc.SupportPackageIsVersion4
type RemoteServiceClient interface {
AddRemote(ctx context.Context, in *AddRemoteRequest, opts ...grpc.CallOption) (*AddRemoteResponse, error)
FetchInternalRemote(ctx context.Context, in *FetchInternalRemoteRequest, opts ...grpc.CallOption) (*FetchInternalRemoteResponse, error)
+ FetchInternalRemoteErrorOnFailure(ctx context.Context, in *FetchInternalRemoteRequest, opts ...grpc.CallOption) (*FetchInternalRemoteResponse, error)
RemoveRemote(ctx context.Context, in *RemoveRemoteRequest, opts ...grpc.CallOption) (*RemoveRemoteResponse, error)
UpdateRemoteMirror(ctx context.Context, opts ...grpc.CallOption) (RemoteService_UpdateRemoteMirrorClient, error)
FindRemoteRepository(ctx context.Context, in *FindRemoteRepositoryRequest, opts ...grpc.CallOption) (*FindRemoteRepositoryResponse, error)
@@ -819,6 +821,15 @@ func (c *remoteServiceClient) FetchInternalRemote(ctx context.Context, in *Fetch
return out, nil
}
+func (c *remoteServiceClient) FetchInternalRemoteErrorOnFailure(ctx context.Context, in *FetchInternalRemoteRequest, opts ...grpc.CallOption) (*FetchInternalRemoteResponse, error) {
+ out := new(FetchInternalRemoteResponse)
+ err := c.cc.Invoke(ctx, "/gitaly.RemoteService/FetchInternalRemoteErrorOnFailure", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *remoteServiceClient) RemoveRemote(ctx context.Context, in *RemoveRemoteRequest, opts ...grpc.CallOption) (*RemoveRemoteResponse, error) {
out := new(RemoveRemoteResponse)
err := c.cc.Invoke(ctx, "/gitaly.RemoteService/RemoveRemote", in, out, opts...)
@@ -916,6 +927,7 @@ func (x *remoteServiceListRemotesClient) Recv() (*ListRemotesResponse, error) {
type RemoteServiceServer interface {
AddRemote(context.Context, *AddRemoteRequest) (*AddRemoteResponse, error)
FetchInternalRemote(context.Context, *FetchInternalRemoteRequest) (*FetchInternalRemoteResponse, error)
+ FetchInternalRemoteErrorOnFailure(context.Context, *FetchInternalRemoteRequest) (*FetchInternalRemoteResponse, error)
RemoveRemote(context.Context, *RemoveRemoteRequest) (*RemoveRemoteResponse, error)
UpdateRemoteMirror(RemoteService_UpdateRemoteMirrorServer) error
FindRemoteRepository(context.Context, *FindRemoteRepositoryRequest) (*FindRemoteRepositoryResponse, error)
@@ -933,6 +945,9 @@ func (*UnimplementedRemoteServiceServer) AddRemote(ctx context.Context, req *Add
func (*UnimplementedRemoteServiceServer) FetchInternalRemote(ctx context.Context, req *FetchInternalRemoteRequest) (*FetchInternalRemoteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FetchInternalRemote not implemented")
}
+func (*UnimplementedRemoteServiceServer) FetchInternalRemoteErrorOnFailure(ctx context.Context, req *FetchInternalRemoteRequest) (*FetchInternalRemoteResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method FetchInternalRemoteErrorOnFailure not implemented")
+}
func (*UnimplementedRemoteServiceServer) RemoveRemote(ctx context.Context, req *RemoveRemoteRequest) (*RemoveRemoteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveRemote not implemented")
}
@@ -989,6 +1004,24 @@ func _RemoteService_FetchInternalRemote_Handler(srv interface{}, ctx context.Con
return interceptor(ctx, in, info, handler)
}
+func _RemoteService_FetchInternalRemoteErrorOnFailure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(FetchInternalRemoteRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RemoteServiceServer).FetchInternalRemoteErrorOnFailure(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/gitaly.RemoteService/FetchInternalRemoteErrorOnFailure",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RemoteServiceServer).FetchInternalRemoteErrorOnFailure(ctx, req.(*FetchInternalRemoteRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _RemoteService_RemoveRemote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemoveRemoteRequest)
if err := dec(in); err != nil {
@@ -1103,6 +1136,10 @@ var _RemoteService_serviceDesc = grpc.ServiceDesc{
Handler: _RemoteService_FetchInternalRemote_Handler,
},
{
+ MethodName: "FetchInternalRemoteErrorOnFailure",
+ Handler: _RemoteService_FetchInternalRemoteErrorOnFailure_Handler,
+ },
+ {
MethodName: "RemoveRemote",
Handler: _RemoteService_RemoveRemote_Handler,
},
diff --git a/proto/remote.proto b/proto/remote.proto
index 2f7970c89..32e59c5f1 100644
--- a/proto/remote.proto
+++ b/proto/remote.proto
@@ -17,6 +17,11 @@ service RemoteService {
op: MUTATOR
};
}
+ rpc FetchInternalRemoteErrorOnFailure(FetchInternalRemoteRequest) returns (FetchInternalRemoteResponse) {
+ option (op_type) = {
+ op: MUTATOR
+ };
+ }
rpc RemoveRemote(RemoveRemoteRequest) returns (RemoveRemoteResponse) {
option (op_type) = {
op: MUTATOR
diff --git a/ruby/proto/gitaly/remote_services_pb.rb b/ruby/proto/gitaly/remote_services_pb.rb
index b97cc6a02..26da651d7 100644
--- a/ruby/proto/gitaly/remote_services_pb.rb
+++ b/ruby/proto/gitaly/remote_services_pb.rb
@@ -16,6 +16,7 @@ module Gitaly
rpc :AddRemote, AddRemoteRequest, AddRemoteResponse
rpc :FetchInternalRemote, FetchInternalRemoteRequest, FetchInternalRemoteResponse
+ rpc :FetchInternalRemoteErrorOnFailure, FetchInternalRemoteRequest, FetchInternalRemoteResponse
rpc :RemoveRemote, RemoveRemoteRequest, RemoveRemoteResponse
rpc :UpdateRemoteMirror, stream(UpdateRemoteMirrorRequest), UpdateRemoteMirrorResponse
rpc :FindRemoteRepository, FindRemoteRepositoryRequest, FindRemoteRepositoryResponse