From 6e43d9f3a1b7a584fae64a30721a329461519050 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Thu, 6 Feb 2020 15:14:10 +0100 Subject: Remove Ruby RefService Because of the changes in the only client still using the CreateBranch, and DeleteBranch RPCs[0], the Ruby part of the RefService could be removed. This change can't be merged before the 12.8 release has been release, and should end up in 12.9. Closes: https://gitlab.com/gitlab-org/gitaly/issues/1585 [0]: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/19815 --- .../praefect/protoregistry/protoregistry_test.go | 2 - internal/service/ref/branches.go | 29 --- internal/service/ref/branches_test.go | 211 --------------- internal/service/ref/server.go | 6 +- internal/service/ref/testhelper_test.go | 11 +- internal/service/register.go | 2 +- proto/go/gitalypb/ref.pb.go | 288 ++++++++------------- proto/ref.proto | 10 - ruby/.rubocop_todo.yml | 16 -- ruby/lib/gitaly_server.rb | 2 - ruby/lib/gitaly_server/ref_service.rb | 47 ---- ruby/proto/gitaly/ref_services_pb.rb | 2 - ruby/spec/gitaly/ref_service_spec.rb | 31 --- .../exception_sanitizer_interceptor_spec.rb | 4 +- .../lib/gitaly_server/rugged_interceptor_spec.rb | 2 +- .../lib/gitaly_server/sentry/url_sanitizer_spec.rb | 2 +- .../lib/gitaly_server/sentry_interceptor_spec.rb | 6 +- 17 files changed, 118 insertions(+), 553 deletions(-) delete mode 100644 ruby/lib/gitaly_server/ref_service.rb delete mode 100644 ruby/spec/gitaly/ref_service_spec.rb diff --git a/internal/praefect/protoregistry/protoregistry_test.go b/internal/praefect/protoregistry/protoregistry_test.go index 8e4d32e3c..e99af93ba 100644 --- a/internal/praefect/protoregistry/protoregistry_test.go +++ b/internal/praefect/protoregistry/protoregistry_test.go @@ -97,8 +97,6 @@ func TestPopulatesProtoRegistry(t *testing.T) { "FindAllTags": protoregistry.OpAccessor, "FindAllRemoteBranches": protoregistry.OpAccessor, "RefExists": protoregistry.OpAccessor, - "CreateBranch": protoregistry.OpMutator, - "DeleteBranch": protoregistry.OpMutator, "FindBranch": protoregistry.OpAccessor, "DeleteRefs": protoregistry.OpMutator, "ListBranchNamesContainingCommit": protoregistry.OpAccessor, diff --git a/internal/service/ref/branches.go b/internal/service/ref/branches.go index fd31ddb13..30a39cd55 100644 --- a/internal/service/ref/branches.go +++ b/internal/service/ref/branches.go @@ -8,40 +8,11 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/log" - "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) -func (s *server) CreateBranch(ctx context.Context, req *gitalypb.CreateBranchRequest) (*gitalypb.CreateBranchResponse, error) { - client, err := s.ruby.RefServiceClient(ctx) - if err != nil { - return nil, err - } - - clientCtx, err := rubyserver.SetHeaders(ctx, req.GetRepository()) - if err != nil { - return nil, err - } - - return client.CreateBranch(clientCtx, req) -} - -func (s *server) DeleteBranch(ctx context.Context, req *gitalypb.DeleteBranchRequest) (*gitalypb.DeleteBranchResponse, error) { - client, err := s.ruby.RefServiceClient(ctx) - if err != nil { - return nil, err - } - - clientCtx, err := rubyserver.SetHeaders(ctx, req.GetRepository()) - if err != nil { - return nil, err - } - - return client.DeleteBranch(clientCtx, req) -} - func (s *server) FindBranch(ctx context.Context, req *gitalypb.FindBranchRequest) (*gitalypb.FindBranchResponse, error) { refName := string(req.GetName()) if len(refName) == 0 { diff --git a/internal/service/ref/branches_test.go b/internal/service/ref/branches_test.go index 7d633137a..b0f6147af 100644 --- a/internal/service/ref/branches_test.go +++ b/internal/service/ref/branches_test.go @@ -2,7 +2,6 @@ package ref import ( "context" - "os/exec" "testing" "github.com/stretchr/testify/require" @@ -12,216 +11,6 @@ import ( "google.golang.org/grpc/codes" ) -func TestSuccessfulCreateBranchRequest(t *testing.T) { - ctx, cancel := testhelper.Context() - defer cancel() - - server, serverSocketPath := runRefServiceServer(t) - defer server.Stop() - - client, conn := newRefServiceClient(t, serverSocketPath) - defer conn.Close() - - testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t) - defer cleanupFn() - - headCommit, err := log.GetCommit(ctx, testRepo, "HEAD") - require.NoError(t, err) - - startPoint := "c7fbe50c7c7419d9701eebe64b1fdacc3df5b9dd" - startPointCommit, err := log.GetCommit(ctx, testRepo, startPoint) - require.NoError(t, err) - - testCases := []struct { - desc string - startPoint string - expectedBranch *gitalypb.Branch - }{ - { - desc: "empty start point", - startPoint: "", - expectedBranch: &gitalypb.Branch{ - Name: []byte("to-be-created-soon-1"), - TargetCommit: headCommit, - }, - }, - { - desc: "present start point", - startPoint: startPoint, - expectedBranch: &gitalypb.Branch{ - Name: []byte("to-be-created-soon-2"), - TargetCommit: startPointCommit, - }, - }, - } - - for _, testCase := range testCases { - t.Run(testCase.desc, func(t *testing.T) { - branchName := testCase.expectedBranch.Name - request := &gitalypb.CreateBranchRequest{ - Repository: testRepo, - Name: branchName, - StartPoint: []byte(testCase.startPoint), - } - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - response, err := client.CreateBranch(ctx, request) - defer exec.Command("git", "-C", testRepoPath, "branch", "-D", string(branchName)).Run() - - require.NoError(t, err) - require.Equal(t, gitalypb.CreateBranchResponse_OK, response.Status, "mismatched status") - require.Equal(t, testCase.expectedBranch, response.Branch, "mismatched branches") - }) - } -} - -func TestFailedCreateBranchRequest(t *testing.T) { - server, serverSocketPath := runRefServiceServer(t) - defer server.Stop() - - client, conn := newRefServiceClient(t, serverSocketPath) - defer conn.Close() - - testRepo, _, cleanupFn := testhelper.NewTestRepo(t) - defer cleanupFn() - - testCases := []struct { - desc string - branchName string - startPoint string - status gitalypb.CreateBranchResponse_Status - }{ - { - desc: "branch exists", - branchName: "master", - status: gitalypb.CreateBranchResponse_ERR_EXISTS, - }, - { - desc: "empty branch name", - branchName: "", - status: gitalypb.CreateBranchResponse_ERR_INVALID, - }, - { - desc: "invalid start point", - branchName: "shiny-new-branch", - startPoint: "i-do-not-exist", - status: gitalypb.CreateBranchResponse_ERR_INVALID_START_POINT, - }, - } - - for _, testCase := range testCases { - t.Run(testCase.desc, func(t *testing.T) { - request := &gitalypb.CreateBranchRequest{ - Repository: testRepo, - Name: []byte(testCase.branchName), - StartPoint: []byte(testCase.startPoint), - } - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - response, err := client.CreateBranch(ctx, request) - - require.NoError(t, err) - require.Equal(t, testCase.status, response.Status, "mismatched status") - }) - } -} - -func TestSuccessfulDeleteBranchRequest(t *testing.T) { - server, serverSocketPath := runRefServiceServer(t) - defer server.Stop() - - client, conn := newRefServiceClient(t, serverSocketPath) - defer conn.Close() - - testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t) - defer cleanupFn() - - branchNameInput := "to-be-deleted-soon" - - defer exec.Command("git", "-C", testRepoPath, "branch", "-D", branchNameInput).Run() - - testCases := []struct { - desc string - branchName string - }{ - { - desc: "regular branch name", - branchName: branchNameInput, - }, - { - desc: "absolute reference path", - branchName: "refs/heads/" + branchNameInput, - }, - } - - for _, testCase := range testCases { - t.Run(testCase.desc, func(t *testing.T) { - testhelper.MustRunCommand(t, nil, "git", "-C", testRepoPath, "branch", branchNameInput) - - request := &gitalypb.DeleteBranchRequest{ - Repository: testRepo, - Name: []byte(testCase.branchName), - } - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - _, err := client.DeleteBranch(ctx, request) - require.NoError(t, err) - - branches := testhelper.MustRunCommand(t, nil, "git", "-C", testRepoPath, "branch") - require.NotContains(t, branches, branchNameInput, "branch name exists in branches list") - }) - } -} - -func TestFailedDeleteBranchRequest(t *testing.T) { - server, serverSocketPath := runRefServiceServer(t) - defer server.Stop() - - client, conn := newRefServiceClient(t, serverSocketPath) - defer conn.Close() - - testRepo, _, cleanupFn := testhelper.NewTestRepo(t) - defer cleanupFn() - - testCases := []struct { - desc string - branchName string - code codes.Code - }{ - { - desc: "branch does not exist", - branchName: "this-branch-does-not-exist", - code: codes.Internal, - }, - { - desc: "empty branch name", - branchName: "", - code: codes.InvalidArgument, - }, - } - - for _, testCase := range testCases { - t.Run(testCase.desc, func(t *testing.T) { - request := &gitalypb.DeleteBranchRequest{ - Repository: testRepo, - Name: []byte(testCase.branchName), - } - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - _, err := client.DeleteBranch(ctx, request) - testhelper.RequireGrpcError(t, err, testCase.code) - }) - } -} - func TestSuccessfulFindBranchRequest(t *testing.T) { ctx, cancel := testhelper.Context() defer cancel() diff --git a/internal/service/ref/server.go b/internal/service/ref/server.go index cfc4e029b..311133fad 100644 --- a/internal/service/ref/server.go +++ b/internal/service/ref/server.go @@ -1,16 +1,14 @@ package ref import ( - "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" ) type server struct { - ruby *rubyserver.Server gitalypb.UnimplementedRefServiceServer } // NewServer creates a new instance of a grpc RefServer -func NewServer(rs *rubyserver.Server) gitalypb.RefServiceServer { - return &server{ruby: rs} +func NewServer() gitalypb.RefServiceServer { + return &server{} } diff --git a/internal/service/ref/testhelper_test.go b/internal/service/ref/testhelper_test.go index 5f2313ec8..2faeb3d0e 100644 --- a/internal/service/ref/testhelper_test.go +++ b/internal/service/ref/testhelper_test.go @@ -7,10 +7,8 @@ import ( "testing" "github.com/golang/protobuf/ptypes/timestamp" - log "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly/internal/helper/lines" - "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" "google.golang.org/grpc" @@ -84,16 +82,9 @@ func TestMain(m *testing.M) { os.Exit(testMain(m)) } -var rubyServer = &rubyserver.Server{} - func testMain(m *testing.M) int { defer testhelper.MustHaveNoChildProcess() - if err := rubyServer.Start(); err != nil { - log.Fatal(err) - } - defer rubyServer.Stop() - // Force small messages to test that fragmenting the // ref list works correctly lines.ItemsPerMessage = 3 @@ -110,7 +101,7 @@ func runRefServiceServer(t *testing.T) (*grpc.Server, string) { t.Fatal(err) } - gitalypb.RegisterRefServiceServer(grpcServer, &server{ruby: rubyServer}) + gitalypb.RegisterRefServiceServer(grpcServer, &server{}) reflection.Register(grpcServer) go grpcServer.Serve(listener) diff --git a/internal/service/register.go b/internal/service/register.go index 5f2e168ec..119b01fa1 100644 --- a/internal/service/register.go +++ b/internal/service/register.go @@ -33,7 +33,7 @@ func RegisterAll(grpcServer *grpc.Server, rubyServer *rubyserver.Server) { gitalypb.RegisterDiffServiceServer(grpcServer, diff.NewServer()) gitalypb.RegisterNamespaceServiceServer(grpcServer, namespace.NewServer()) gitalypb.RegisterOperationServiceServer(grpcServer, operations.NewServer(rubyServer)) - gitalypb.RegisterRefServiceServer(grpcServer, ref.NewServer(rubyServer)) + gitalypb.RegisterRefServiceServer(grpcServer, ref.NewServer()) gitalypb.RegisterRepositoryServiceServer(grpcServer, repository.NewServer(rubyServer)) gitalypb.RegisterSSHServiceServer(grpcServer, ssh.NewServer()) gitalypb.RegisterSmartHTTPServiceServer(grpcServer, smarthttp.NewServer()) diff --git a/proto/go/gitalypb/ref.pb.go b/proto/go/gitalypb/ref.pb.go index f7b1e0c4c..b027de455 100644 --- a/proto/go/gitalypb/ref.pb.go +++ b/proto/go/gitalypb/ref.pb.go @@ -2089,115 +2089,113 @@ func init() { func init() { proto.RegisterFile("ref.proto", fileDescriptor_65d958559ea81b29) } var fileDescriptor_65d958559ea81b29 = []byte{ - // 1730 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x5f, 0x6f, 0x1b, 0x4b, - 0x15, 0xef, 0x3a, 0x89, 0x63, 0x1f, 0xbb, 0xce, 0x66, 0xf2, 0xcf, 0xd9, 0xb4, 0x4d, 0x3a, 0xfd, - 0x97, 0xd0, 0xe2, 0x94, 0x54, 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, - 0xbc, 0xe1, 0x47, 0xd9, 0xf5, 0x30, 0x02, 0x35, 0xf2, 0x23, 0xe2, 0xdc, 0xfb, 0x7f, 0x09, 0x80, - 0xd0, 0x6e, 0x83, 0xba, 0xef, 0xad, 0x36, 0x45, 0x36, 0xac, 0xa4, 0x3e, 0xe4, 0xd1, 0xfd, 0x38, - 0x4b, 0x1c, 0xf7, 0x0b, 0x82, 0xf6, 0xe0, 0x12, 0x2d, 0x39, 0x79, 0xb2, 0x5f, 0xfd, 0x73, 0x3b, - 0x93, 0xcb, 0x20, 0x1a, 0xd2, 0xac, 0x58, 0x1b, 0x42, 0x77, 0x53, 0x09, 0x69, 0xfc, 0x55, 0xae, - 0xe1, 0x49, 0x2a, 0x49, 0x27, 0x4f, 0x15, 0xf4, 0x6b, 0xc1, 0xff, 0x62, 0x2f, 0x71, 0x74, 0x67, - 0x08, 0x60, 0xe8, 0xd9, 0xaf, 0x6d, 0x8e, 0xdd, 0x1f, 0x41, 0xaf, 0x43, 0x21, 0xf6, 0x60, 0x46, - 0x5a, 0xdc, 0x32, 0xf9, 0x94, 0xd7, 0x36, 0x52, 0xf7, 0x86, 0x92, 0xd2, 0x12, 0x63, 0x39, 0xf1, - 0x0a, 0x45, 0x5b, 0x97, 0x3d, 0x81, 0xb5, 0xbb, 0x13, 0x34, 0x26, 0x64, 0x24, 0xf4, 0x70, 0x67, - 0xec, 0x33, 0x20, 0x3d, 0x23, 0x13, 0xd0, 0x4f, 0x45, 0x46, 0x24, 0xdb, 0x4d, 0x66, 0x24, 0x49, - 0xa9, 0x93, 0x19, 0x19, 0xa2, 0xc7, 0x31, 0xc4, 0x7d, 0x98, 0x97, 0x0c, 0x1e, 0xad, 0xc6, 0x2d, - 0xa2, 0x97, 0x83, 0xb6, 0x36, 0x22, 0x1f, 0xca, 0x6b, 0x5f, 0x94, 0xf6, 0xc8, 0x57, 0x36, 0x59, - 0xda, 0xe3, 0x9a, 0x49, 0xb2, 0xb4, 0xc7, 0x7e, 0xef, 0x63, 0x31, 0xbf, 0x80, 0x7c, 0xc8, 0xad, - 0x51, 0x39, 0xfa, 0xee, 0x26, 0xe9, 0xbc, 0xb6, 0x9e, 0xb2, 0x33, 0x14, 0xf9, 0x2f, 0xa0, 0x18, - 0x27, 0xb1, 0x68, 0x23, 0x9d, 0xda, 0x0a, 0xbc, 0x5b, 0x93, 0x78, 0xaf, 0x84, 0x54, 0x7c, 0xc8, - 0x38, 0x27, 0x8c, 0x20, 0x53, 0xe8, 0x68, 0x04, 0x99, 0x4a, 0x23, 0x03, 0xc8, 0x63, 0x80, 0x88, - 0xeb, 0xa1, 0xf5, 0x78, 0xba, 0x92, 0x70, 0x5a, 0xda, 0xd6, 0xd0, 0x91, 0x8f, 0x01, 0x22, 0xa2, - 0x15, 0x81, 0x8d, 0xb0, 0xc1, 0x08, 0x6c, 0x94, 0x97, 0x85, 0x91, 0xfd, 0x45, 0x81, 0xcd, 0x4b, - 0xb8, 0x0e, 0xaa, 0x04, 0x38, 0x57, 0xe3, 0x6a, 0xda, 0xee, 0x95, 0xf5, 0x47, 0x0a, 0xe3, 0x93, - 0x02, 0xb7, 0x26, 0x31, 0x12, 0xf4, 0x38, 0x8e, 0x7d, 0x09, 0x97, 0xd2, 0x9e, 0x5c, 0x4d, 0x79, - 0x24, 0x8a, 0x77, 0x50, 0x4a, 0xd2, 0x09, 0x74, 0x3b, 0x1c, 0xb5, 0x69, 0x1c, 0x47, 0xbb, 0x33, - 0x6e, 0x3b, 0x0d, 0x3a, 0x39, 0xde, 0x23, 0xe8, 0x54, 0x9a, 0x11, 0x41, 0xa7, 0xb3, 0x82, 0x18, - 0x74, 0x03, 0x8a, 0xf1, 0xdf, 0xc6, 0xa3, 0xba, 0x4d, 0xf9, 0xd5, 0x3e, 0xaa, 0xdb, 0xb4, 0x9f, - 0xd3, 0x63, 0xa0, 0x35, 0xc8, 0x05, 0x73, 0x11, 0x85, 0x6d, 0x64, 0x68, 0x22, 0x6b, 0xe5, 0xd1, - 0x8d, 0x64, 0x99, 0xed, 0x3f, 0xfd, 0x95, 0xaf, 0x62, 0x1b, 0xad, 0x4a, 0xdb, 0xe9, 0xed, 0x8a, - 0x8f, 0xdf, 0x75, 0x5c, 0x73, 0x57, 0x18, 0x8a, 0xff, 0x3a, 0xec, 0x9a, 0x8e, 0x5c, 0x0f, 0x5a, - 0xad, 0x2c, 0x17, 0x3d, 0xfb, 0x3a, 0x00, 0x00, 0xff, 0xff, 0x50, 0x11, 0x7c, 0x1b, 0xc5, 0x18, + // 1698 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6f, 0x1b, 0xc9, + 0x11, 0xf6, 0x50, 0x12, 0x45, 0x16, 0x69, 0x6a, 0xd4, 0x7a, 0x51, 0x23, 0xdb, 0x92, 0xdb, 0x2f, + 0x29, 0x76, 0x28, 0x47, 0x46, 0x82, 0x00, 0x09, 0x90, 0x50, 0x12, 0x63, 0x2b, 0xb6, 0x29, 0xa1, + 0x49, 0xc7, 0x76, 0x10, 0x64, 0x30, 0x24, 0x9b, 0xa3, 0x49, 0x86, 0x1c, 0x66, 0xa6, 0x65, 0x5b, + 0xc9, 0x2d, 0xce, 0x31, 0x40, 0x80, 0x04, 0x41, 0x72, 0xd8, 0xd3, 0x1e, 0xf6, 0x27, 0xec, 0x4f, + 0xd8, 0xcb, 0x62, 0xff, 0xd0, 0x9e, 0x16, 0xd3, 0xdd, 0xf3, 0x22, 0x87, 0x94, 0x00, 0xd1, 0xd8, + 0x3d, 0x91, 0x5d, 0x5d, 0xf5, 0x55, 0x75, 0x75, 0x75, 0x3d, 0x06, 0xf2, 0x2e, 0xed, 0x56, 0x06, + 0xae, 0xc3, 0x1c, 0x94, 0x35, 0x2d, 0x66, 0xd8, 0xe7, 0x1a, 0xb4, 0x6c, 0xa7, 0x25, 0x68, 0x5a, + 0xd1, 0x3b, 0x35, 0x5c, 0xda, 0x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 0xb4, 0x1d, 0xc1, 0x6c, + 0xdf, 0xe8, 0x51, 0x0e, 0x5a, 0x24, 0xfc, 0x3f, 0x7e, 0x05, 0xeb, 0xbe, 0x50, 0xd5, 0xb6, 0x23, + 0x81, 0xab, 0x7b, 0x1c, 0xef, 0x81, 0x96, 0x06, 0x2b, 0x0d, 0x59, 0x86, 0x39, 0x5f, 0xb9, 0xf0, + 0x5c, 0x91, 0x88, 0x05, 0x26, 0xb0, 0x2a, 0x65, 0x9a, 0x86, 0x39, 0x25, 0x3b, 0x76, 0x61, 0x6d, + 0x04, 0x73, 0xa2, 0x11, 0x1f, 0x15, 0x40, 0xbe, 0x04, 0xa1, 0xdd, 0xa9, 0xdc, 0xca, 0xe4, 0xd8, + 0x5b, 0x85, 0xec, 0xc0, 0xa5, 0x5d, 0xeb, 0x03, 0x0f, 0xbe, 0x22, 0x91, 0x2b, 0xbc, 0x03, 0x4b, + 0x09, 0x23, 0x26, 0x5c, 0xe0, 0x37, 0x0a, 0x94, 0x7d, 0xde, 0x17, 0x4e, 0xdb, 0x90, 0xce, 0x9e, + 0x82, 0xe3, 0xd0, 0xaf, 0x61, 0xde, 0x73, 0x5c, 0xa6, 0xb7, 0xce, 0xb9, 0xd1, 0xa5, 0xbd, 0x07, + 0x81, 0xd8, 0x38, 0x65, 0x95, 0x86, 0xe3, 0xb2, 0xfd, 0x73, 0x92, 0xf5, 0xf8, 0x2f, 0xfe, 0x29, + 0x64, 0x05, 0x05, 0xe5, 0x60, 0xb6, 0x5e, 0x7d, 0x59, 0x53, 0xaf, 0xa1, 0x05, 0x28, 0xbc, 0x3a, + 0x39, 0xac, 0x36, 0x6b, 0x87, 0x7a, 0xb5, 0x71, 0xa0, 0x2a, 0x48, 0x85, 0x62, 0x40, 0x38, 0xac, + 0x35, 0x0e, 0xd4, 0x0c, 0x7e, 0x23, 0x02, 0x72, 0x48, 0x83, 0x74, 0xc0, 0x2f, 0x20, 0xd7, 0x92, + 0x34, 0xf9, 0xea, 0x36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b, 0x61, 0x11, 0x4b, 0xeb, 0x1e, 0xb4, 0x5b, + 0xe3, 0xb6, 0xd3, 0xa0, 0x93, 0x85, 0x33, 0x82, 0x4e, 0x2d, 0xe0, 0x11, 0x74, 0x7a, 0xbd, 0x8d, + 0x41, 0x37, 0xa0, 0x18, 0xff, 0xea, 0x8c, 0x36, 0x86, 0x24, 0xe3, 0xdf, 0xc3, 0xb5, 0x1b, 0xe9, + 0x9b, 0x23, 0xa0, 0x35, 0xc8, 0x05, 0x15, 0x07, 0x85, 0x0f, 0x74, 0xa8, 0xd6, 0x69, 0xe5, 0xd1, + 0x8d, 0x64, 0x98, 0xed, 0x3f, 0xfe, 0xbd, 0xcf, 0x62, 0x1b, 0xad, 0x4a, 0xdb, 0xe9, 0xed, 0x8a, + 0xbf, 0x3f, 0x76, 0x5c, 0x73, 0x57, 0x08, 0x8a, 0xef, 0xf9, 0xbb, 0xa6, 0x23, 0xd7, 0x83, 0x56, + 0x2b, 0xcb, 0x49, 0x4f, 0xbe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x12, 0xf7, 0x96, 0x99, 0x1f, 0x18, 0x00, 0x00, } @@ -2225,8 +2223,6 @@ type RefServiceClient interface { FindTag(ctx context.Context, in *FindTagRequest, opts ...grpc.CallOption) (*FindTagResponse, error) FindAllRemoteBranches(ctx context.Context, in *FindAllRemoteBranchesRequest, opts ...grpc.CallOption) (RefService_FindAllRemoteBranchesClient, error) RefExists(ctx context.Context, in *RefExistsRequest, opts ...grpc.CallOption) (*RefExistsResponse, error) - CreateBranch(ctx context.Context, in *CreateBranchRequest, opts ...grpc.CallOption) (*CreateBranchResponse, error) - DeleteBranch(ctx context.Context, in *DeleteBranchRequest, opts ...grpc.CallOption) (*DeleteBranchResponse, error) FindBranch(ctx context.Context, in *FindBranchRequest, opts ...grpc.CallOption) (*FindBranchResponse, error) DeleteRefs(ctx context.Context, in *DeleteRefsRequest, opts ...grpc.CallOption) (*DeleteRefsResponse, error) ListBranchNamesContainingCommit(ctx context.Context, in *ListBranchNamesContainingCommitRequest, opts ...grpc.CallOption) (RefService_ListBranchNamesContainingCommitClient, error) @@ -2474,24 +2470,6 @@ func (c *refServiceClient) RefExists(ctx context.Context, in *RefExistsRequest, return out, nil } -func (c *refServiceClient) CreateBranch(ctx context.Context, in *CreateBranchRequest, opts ...grpc.CallOption) (*CreateBranchResponse, error) { - out := new(CreateBranchResponse) - err := c.cc.Invoke(ctx, "/gitaly.RefService/CreateBranch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *refServiceClient) DeleteBranch(ctx context.Context, in *DeleteBranchRequest, opts ...grpc.CallOption) (*DeleteBranchResponse, error) { - out := new(DeleteBranchResponse) - err := c.cc.Invoke(ctx, "/gitaly.RefService/DeleteBranch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *refServiceClient) FindBranch(ctx context.Context, in *FindBranchRequest, opts ...grpc.CallOption) (*FindBranchResponse, error) { out := new(FindBranchResponse) err := c.cc.Invoke(ctx, "/gitaly.RefService/FindBranch", in, out, opts...) @@ -2693,8 +2671,6 @@ type RefServiceServer interface { FindTag(context.Context, *FindTagRequest) (*FindTagResponse, error) FindAllRemoteBranches(*FindAllRemoteBranchesRequest, RefService_FindAllRemoteBranchesServer) error RefExists(context.Context, *RefExistsRequest) (*RefExistsResponse, error) - CreateBranch(context.Context, *CreateBranchRequest) (*CreateBranchResponse, error) - DeleteBranch(context.Context, *DeleteBranchRequest) (*DeleteBranchResponse, error) FindBranch(context.Context, *FindBranchRequest) (*FindBranchResponse, error) DeleteRefs(context.Context, *DeleteRefsRequest) (*DeleteRefsResponse, error) ListBranchNamesContainingCommit(*ListBranchNamesContainingCommitRequest, RefService_ListBranchNamesContainingCommitServer) error @@ -2740,12 +2716,6 @@ func (*UnimplementedRefServiceServer) FindAllRemoteBranches(req *FindAllRemoteBr func (*UnimplementedRefServiceServer) RefExists(ctx context.Context, req *RefExistsRequest) (*RefExistsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RefExists not implemented") } -func (*UnimplementedRefServiceServer) CreateBranch(ctx context.Context, req *CreateBranchRequest) (*CreateBranchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateBranch not implemented") -} -func (*UnimplementedRefServiceServer) DeleteBranch(ctx context.Context, req *DeleteBranchRequest) (*DeleteBranchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteBranch not implemented") -} func (*UnimplementedRefServiceServer) FindBranch(ctx context.Context, req *FindBranchRequest) (*FindBranchResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindBranch not implemented") } @@ -2973,42 +2943,6 @@ func _RefService_RefExists_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -func _RefService_CreateBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateBranchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RefServiceServer).CreateBranch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gitaly.RefService/CreateBranch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RefServiceServer).CreateBranch(ctx, req.(*CreateBranchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RefService_DeleteBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteBranchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RefServiceServer).DeleteBranch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gitaly.RefService/DeleteBranch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RefServiceServer).DeleteBranch(ctx, req.(*DeleteBranchRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _RefService_FindBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FindBranchRequest) if err := dec(in); err != nil { @@ -3188,14 +3122,6 @@ var _RefService_serviceDesc = grpc.ServiceDesc{ MethodName: "RefExists", Handler: _RefService_RefExists_Handler, }, - { - MethodName: "CreateBranch", - Handler: _RefService_CreateBranch_Handler, - }, - { - MethodName: "DeleteBranch", - Handler: _RefService_DeleteBranch_Handler, - }, { MethodName: "FindBranch", Handler: _RefService_FindBranch_Handler, diff --git a/proto/ref.proto b/proto/ref.proto index 1c39810b9..18dad2fc6 100644 --- a/proto/ref.proto +++ b/proto/ref.proto @@ -62,16 +62,6 @@ service RefService { op: ACCESSOR }; } - rpc CreateBranch(CreateBranchRequest) returns (CreateBranchResponse) { - option (op_type) = { - op: MUTATOR - }; - } - rpc DeleteBranch(DeleteBranchRequest) returns (DeleteBranchResponse) { - option (op_type) = { - op: MUTATOR - }; - } rpc FindBranch(FindBranchRequest) returns (FindBranchResponse) { option (op_type) = { op: ACCESSOR diff --git a/ruby/.rubocop_todo.yml b/ruby/.rubocop_todo.yml index 88c94e5e2..4be800dfc 100644 --- a/ruby/.rubocop_todo.yml +++ b/ruby/.rubocop_todo.yml @@ -25,7 +25,6 @@ Lint/AssignmentInCondition: Exclude: - 'lib/gitaly_server/conflicts_service.rb' - 'lib/gitaly_server/diff_service.rb' - - 'lib/gitaly_server/ref_service.rb' - 'lib/gitaly_server/wiki_service.rb' - 'lib/gitlab/git/repository.rb' - 'lib/gitlab/version_info.rb' @@ -159,12 +158,6 @@ Style/ModuleFunction: Exclude: - 'lib/gitlab/encoding_helper.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Style/MultilineIfModifier: - Exclude: - - 'lib/gitaly_server/ref_service.rb' - # Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: EnforcedOctalStyle. @@ -211,7 +204,6 @@ Style/RaiseArgs: - 'lib/gitaly_server/client.rb' - 'lib/gitaly_server/conflicts_service.rb' - 'lib/gitaly_server/operations_service.rb' - - 'lib/gitaly_server/ref_service.rb' - 'lib/gitaly_server/repository_service.rb' - 'lib/gitlab/git/operation_service.rb' - 'lib/gitlab/git/remote_repository.rb' @@ -223,14 +215,6 @@ Style/RedundantSelf: - 'lib/gitlab/git.rb' - 'lib/gitlab/git/blob.rb' -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, AllowInnerSlashes. -# SupportedStyles: slashes, percent_r, mixed -Style/RegexpLiteral: - Exclude: - - 'lib/gitaly_server/ref_service.rb' - # Offense count: 17 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. diff --git a/ruby/lib/gitaly_server.rb b/ruby/lib/gitaly_server.rb index acbfd2f96..b6a085f57 100644 --- a/ruby/lib/gitaly_server.rb +++ b/ruby/lib/gitaly_server.rb @@ -6,7 +6,6 @@ require_relative 'gitlab/git.rb' require_relative 'gitaly_server/client.rb' require_relative 'gitaly_server/utils.rb' require_relative 'gitaly_server/blob_service.rb' -require_relative 'gitaly_server/ref_service.rb' require_relative 'gitaly_server/operations_service.rb' require_relative 'gitaly_server/repository_service.rb' require_relative 'gitaly_server/wiki_service.rb' @@ -47,7 +46,6 @@ module GitalyServer end def self.register_handlers(server) - server.handle(RefService.new) server.handle(OperationsService.new) server.handle(RepositoryService.new) server.handle(WikiService.new) diff --git a/ruby/lib/gitaly_server/ref_service.rb b/ruby/lib/gitaly_server/ref_service.rb deleted file mode 100644 index 2c14b0882..000000000 --- a/ruby/lib/gitaly_server/ref_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -module GitalyServer - class RefService < Gitaly::RefService::Service - include Utils - - TAGS_PER_MESSAGE = 100 - - def create_branch(request, call) - start_point = request.start_point - start_point = 'HEAD' if start_point.empty? - branch_name = request.name - - repo = Gitlab::Git::Repository.from_gitaly(request.repository, call) - rugged_ref = repo.rugged.branches.create(branch_name, start_point) - - Gitaly::CreateBranchResponse.new( - status: :OK, - branch: Gitaly::Branch.new( - name: rugged_ref.name.b, - target_commit: gitaly_commit_from_rugged(rugged_ref.target) - ) - ) - rescue Rugged::ReferenceError => e - status = case e.to_s - when /'refs\/heads\/#{branch_name}' is not valid/ - :ERR_INVALID - when /a reference with that name already exists/ - :ERR_EXISTS - else - :ERR_INVALID_START_POINT - end - - Gitaly::CreateBranchResponse.new(status: status) - end - - def delete_branch(request, call) - branch_name = request.name - raise GRPC::InvalidArgument.new("empty Name") if branch_name.empty? - - repo = Gitlab::Git::Repository.from_gitaly(request.repository, call) - repo.delete_branch(branch_name) - - Gitaly::DeleteBranchResponse.new - rescue Gitlab::Git::Repository::DeleteBranchError => e - raise GRPC::Internal.new(e.to_s) - end - end -end diff --git a/ruby/proto/gitaly/ref_services_pb.rb b/ruby/proto/gitaly/ref_services_pb.rb index a74ef2d38..8d87890a2 100644 --- a/ruby/proto/gitaly/ref_services_pb.rb +++ b/ruby/proto/gitaly/ref_services_pb.rb @@ -26,8 +26,6 @@ module Gitaly rpc :FindTag, FindTagRequest, FindTagResponse rpc :FindAllRemoteBranches, FindAllRemoteBranchesRequest, stream(FindAllRemoteBranchesResponse) rpc :RefExists, RefExistsRequest, RefExistsResponse - rpc :CreateBranch, CreateBranchRequest, CreateBranchResponse - rpc :DeleteBranch, DeleteBranchRequest, DeleteBranchResponse rpc :FindBranch, FindBranchRequest, FindBranchResponse rpc :DeleteRefs, DeleteRefsRequest, DeleteRefsResponse rpc :ListBranchNamesContainingCommit, ListBranchNamesContainingCommitRequest, stream(ListBranchNamesContainingCommitResponse) diff --git a/ruby/spec/gitaly/ref_service_spec.rb b/ruby/spec/gitaly/ref_service_spec.rb deleted file mode 100644 index c3ba9d30c..000000000 --- a/ruby/spec/gitaly/ref_service_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -require 'securerandom' -require 'spec_helper' - -describe Gitaly::RefService do - include IntegrationClient - include TestRepo - - let(:service_stub) { gitaly_stub(:RefService) } - - describe 'CreateBranch' do - it 'can create a branch' do - repo = new_mutable_test_repo - branch_name = 'branch-' + SecureRandom.hex(10) - request = Gitaly::CreateBranchRequest.new( - repository: repo, - name: branch_name, - start_point: 'master' - ) - - response = service_stub.create_branch(request) - - expect(response.status).to eq(:OK) - - # Intentionally instatiate this Rugged::Repository after we performed - # the RPC, to ensure we don't see stale repository state. - rugged = rugged_from_gitaly(repo) - - expect(response.branch.target_commit.id).to eq(rugged.branches[branch_name].target_id) - end - end -end diff --git a/ruby/spec/lib/gitaly_server/exception_sanitizer_interceptor_spec.rb b/ruby/spec/lib/gitaly_server/exception_sanitizer_interceptor_spec.rb index 2e5516173..7e3bc328d 100644 --- a/ruby/spec/lib/gitaly_server/exception_sanitizer_interceptor_spec.rb +++ b/ruby/spec/lib/gitaly_server/exception_sanitizer_interceptor_spec.rb @@ -1,8 +1,8 @@ require 'spec_helper' - require_relative '../../../lib/gitaly_server/exception_sanitizer_interceptor.rb' + describe GitalyServer::ExceptionSanitizerInterceptor do - let(:meth) { GitalyServer::RefService.instance_method(:create_branch) } + let(:meth) { GitalyServer::OperationsService.instance_method(:user_create_branch) } let(:ex) { StandardError.new("error: failed to push some refs to 'https://fO0BA7:HunTer!@github.com/ruby/ruby.git'") } let(:ex_sanitized_message) { "error: failed to push some refs to 'https://[FILTERED]@github.com/ruby/ruby.git'" } let(:call) { double(metadata: {}) } diff --git a/ruby/spec/lib/gitaly_server/rugged_interceptor_spec.rb b/ruby/spec/lib/gitaly_server/rugged_interceptor_spec.rb index 01aab9f94..d6df2f407 100644 --- a/ruby/spec/lib/gitaly_server/rugged_interceptor_spec.rb +++ b/ruby/spec/lib/gitaly_server/rugged_interceptor_spec.rb @@ -5,7 +5,7 @@ require_relative '../../../lib/gitaly_server/rugged_interceptor.rb' describe GitalyServer::RuggedInterceptor do include TestRepo - let(:meth) { GitalyServer::RefService.instance_method(:create_branch) } + let(:meth) { GitalyServer::OperationsService.instance_method(:user_create_branch) } let(:call) { double(metadata: {}) } subject do diff --git a/ruby/spec/lib/gitaly_server/sentry/url_sanitizer_spec.rb b/ruby/spec/lib/gitaly_server/sentry/url_sanitizer_spec.rb index c582e7362..858045f31 100644 --- a/ruby/spec/lib/gitaly_server/sentry/url_sanitizer_spec.rb +++ b/ruby/spec/lib/gitaly_server/sentry/url_sanitizer_spec.rb @@ -4,7 +4,7 @@ require 'raven/base' require 'raven/transports/dummy' require_relative '../../../../lib/gitaly_server/sentry.rb' describe GitalyServer::Sentry::URLSanitizer do - let(:meth) { GitalyServer::RefService.instance_method(:create_branch) } + let(:meth) { GitalyServer::OperationsService.instance_method(:user_create_branch) } let(:ex) { StandardError.new("error: failed to push some refs to 'https://fO0BA7:HunTer!@github.com/ruby/ruby.git'") } let(:ex_sanitized_message) { "error: failed to push some refs to 'https://[FILTERED]@github.com/ruby/ruby.git'" } let(:call) { double(metadata: {}) } diff --git a/ruby/spec/lib/gitaly_server/sentry_interceptor_spec.rb b/ruby/spec/lib/gitaly_server/sentry_interceptor_spec.rb index 5e48da132..9b4be30b1 100644 --- a/ruby/spec/lib/gitaly_server/sentry_interceptor_spec.rb +++ b/ruby/spec/lib/gitaly_server/sentry_interceptor_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require_relative '../../../lib/gitaly_server/sentry_interceptor.rb' describe GitalyServer::SentryInterceptor do describe 'handling exceptions' do - let(:meth) { GitalyServer::RefService.instance_method(:create_branch) } + let(:meth) { GitalyServer::OperationsService.instance_method(:user_create_branch) } let(:ex) { ArgumentError.new("unknown encoding") } let(:call) { nil } @@ -45,7 +45,7 @@ describe GitalyServer::SentryInterceptor do let(:expected_tags) do call_metadata.merge( 'system' => 'gitaly-ruby', - 'gitaly-ruby.method' => 'GitalyServer::RefService#create_branch' + 'gitaly-ruby.method' => 'GitalyServer::OperationsService#user_create_branch' ) end @@ -67,7 +67,7 @@ describe GitalyServer::SentryInterceptor do it 'sends the exception to Sentry' do expect(Raven).to receive(:capture_exception).with( ex, - fingerprint: ['gitaly-ruby', 'GitalyServer::RefService#create_branch', 'unknown encoding'] + fingerprint: ['gitaly-ruby', 'GitalyServer::OperationsService#user_create_branch', 'unknown encoding'] ) begin -- cgit v1.2.3