diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2020-10-15 12:58:13 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2020-10-15 12:58:13 +0300 |
commit | 42c4f256a282ed30300c546bbb3483a800474c8b (patch) | |
tree | 62226ccc6795e950f652c9575fa5515cc6ebb4c0 | |
parent | 20fcc5232cc0ec8ef3c46af6cfcc3a698b9b7d8d (diff) | |
parent | a67612102ed6bb365f1de6572ecf2744e498bc73 (diff) |
Merge branch 'id-allow-conflicts-on-merge' into 'master'
Add option to include conflict markers to merge commit
See merge request gitlab-org/gitaly!2626
-rw-r--r-- | changelogs/unreleased/id-allow-conflicts-on-merge.yml | 5 | ||||
-rw-r--r-- | internal/gitaly/service/operations/merge.go | 2 | ||||
-rw-r--r-- | internal/gitaly/service/operations/merge_test.go | 58 | ||||
-rw-r--r-- | proto/go/gitalypb/operations.pb.go | 285 | ||||
-rw-r--r-- | proto/operations.proto | 3 | ||||
-rw-r--r-- | ruby/.rubocop_todo.yml | 2 | ||||
-rw-r--r-- | ruby/lib/gitaly_server/operations_service.rb | 2 | ||||
-rw-r--r-- | ruby/lib/gitlab/git/repository.rb | 23 | ||||
-rw-r--r-- | ruby/proto/gitaly/operations_pb.rb | 1 |
9 files changed, 236 insertions, 145 deletions
diff --git a/changelogs/unreleased/id-allow-conflicts-on-merge.yml b/changelogs/unreleased/id-allow-conflicts-on-merge.yml new file mode 100644 index 000000000..22d6c7582 --- /dev/null +++ b/changelogs/unreleased/id-allow-conflicts-on-merge.yml @@ -0,0 +1,5 @@ +--- +title: Add option to include conflict markers to merge commit +merge_request: 2626 +author: +type: added diff --git a/internal/gitaly/service/operations/merge.go b/internal/gitaly/service/operations/merge.go index 466cbf5e0..f5ab8a346 100644 --- a/internal/gitaly/service/operations/merge.go +++ b/internal/gitaly/service/operations/merge.go @@ -444,7 +444,7 @@ func (s *server) UserMergeToRef(ctx context.Context, in *gitalypb.UserMergeToRef return nil, helper.ErrInvalidArgument(err) } - if featureflag.IsEnabled(ctx, featureflag.GoUserMergeBranch) { + if featureflag.IsEnabled(ctx, featureflag.GoUserMergeBranch) && !in.AllowConflicts { return s.userMergeToRef(ctx, in) } diff --git a/internal/gitaly/service/operations/merge_test.go b/internal/gitaly/service/operations/merge_test.go index feeb9a408..8e0cb3faa 100644 --- a/internal/gitaly/service/operations/merge_test.go +++ b/internal/gitaly/service/operations/merge_test.go @@ -1,6 +1,7 @@ package operations import ( + "bytes" "context" "fmt" "io/ioutil" @@ -617,6 +618,57 @@ func testSuccessfulUserMergeToRefRequest(t *testing.T, ctx context.Context) { } } +func TestConflictsOnUserMergeToRefRequest(t *testing.T) { + testWithFeature(t, featureflag.GoUserMergeToRef, testConflictsOnUserMergeToRefRequest) +} + +func testConflictsOnUserMergeToRefRequest(t *testing.T, ctx context.Context) { + serverSocketPath, stop := runOperationServiceServer(t) + defer stop() + + client, conn := newOperationClient(t, serverSocketPath) + defer conn.Close() + + testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t) + defer cleanupFn() + + prepareMergeBranchWithHead(t, testRepoPath, "824be604a34828eb682305f0d963056cfac87b2d") + + request := &gitalypb.UserMergeToRefRequest{ + Repository: testRepo, + User: testhelper.TestUser, + TargetRef: []byte("refs/merge-requests/x/written"), + SourceSha: "1450cd639e0bc6721eb02800169e464f212cde06", + Message: []byte("message1"), + FirstParentRef: []byte("refs/heads/" + mergeBranchName), + } + + t.Run("allow conflicts to be merged with markers", func(t *testing.T) { + request.AllowConflicts = true + + resp, err := client.UserMergeToRef(ctx, request) + require.NoError(t, err) + + var buf bytes.Buffer + cmd := exec.Command(command.GitPath(), "-C", testRepoPath, "show", resp.CommitId) + cmd.Stdout = &buf + require.NoError(t, cmd.Run()) + + bufStr := buf.String() + require.Contains(t, bufStr, "+<<<<<<< files/ruby/popen.rb") + require.Contains(t, bufStr, "+>>>>>>> files/ruby/popen.rb") + require.Contains(t, bufStr, "+<<<<<<< files/ruby/regex.rb") + require.Contains(t, bufStr, "+>>>>>>> files/ruby/regex.rb") + }) + + t.Run("disallow conflicts to be merged", func(t *testing.T) { + request.AllowConflicts = false + + _, err := client.UserMergeToRef(ctx, request) + require.Error(t, err) + }) +} + func TestFailedUserMergeToRefRequest(t *testing.T) { testWithFeature(t, featureflag.GoUserMergeToRef, testFailedUserMergeToRefRequest) } @@ -764,8 +816,12 @@ func testUserMergeToRefIgnoreHooksRequest(t *testing.T, ctx context.Context) { } func prepareMergeBranch(t *testing.T, testRepoPath string) { + prepareMergeBranchWithHead(t, testRepoPath, mergeBranchHeadBefore) +} + +func prepareMergeBranchWithHead(t *testing.T, testRepoPath, mergeBranchHead string) { deleteBranch(testRepoPath, mergeBranchName) - out, err := exec.Command(command.GitPath(), "-C", testRepoPath, "branch", mergeBranchName, mergeBranchHeadBefore).CombinedOutput() + out, err := exec.Command(command.GitPath(), "-C", testRepoPath, "branch", mergeBranchName, mergeBranchHead).CombinedOutput() require.NoError(t, err, "set up branch to merge into: %s", out) } diff --git a/proto/go/gitalypb/operations.pb.go b/proto/go/gitalypb/operations.pb.go index d71383d22..0a0f73fd9 100644 --- a/proto/go/gitalypb/operations.pb.go +++ b/proto/go/gitalypb/operations.pb.go @@ -803,10 +803,13 @@ type UserMergeToRefRequest struct { User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` SourceSha string `protobuf:"bytes,3,opt,name=source_sha,json=sourceSha,proto3" json:"source_sha,omitempty"` // branch is deprecated in favor of `first_parent_ref`. - Branch []byte `protobuf:"bytes,4,opt,name=branch,proto3" json:"branch,omitempty"` - TargetRef []byte `protobuf:"bytes,5,opt,name=target_ref,json=targetRef,proto3" json:"target_ref,omitempty"` - Message []byte `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` - FirstParentRef []byte `protobuf:"bytes,7,opt,name=first_parent_ref,json=firstParentRef,proto3" json:"first_parent_ref,omitempty"` + Branch []byte `protobuf:"bytes,4,opt,name=branch,proto3" json:"branch,omitempty"` + TargetRef []byte `protobuf:"bytes,5,opt,name=target_ref,json=targetRef,proto3" json:"target_ref,omitempty"` + Message []byte `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` + FirstParentRef []byte `protobuf:"bytes,7,opt,name=first_parent_ref,json=firstParentRef,proto3" json:"first_parent_ref,omitempty"` + // Allow conflicts to occur. Any conflict markers will be part of the merge commit. + // Only text conflicts are handled, tree-based conflicts are not supported. + AllowConflicts bool `protobuf:"varint,8,opt,name=allow_conflicts,json=allowConflicts,proto3" json:"allow_conflicts,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -886,6 +889,13 @@ func (m *UserMergeToRefRequest) GetFirstParentRef() []byte { return nil } +func (m *UserMergeToRefRequest) GetAllowConflicts() bool { + if m != nil { + return m.AllowConflicts + } + return false +} + type UserMergeToRefResponse struct { CommitId string `protobuf:"bytes,1,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` PreReceiveError string `protobuf:"bytes,2,opt,name=pre_receive_error,json=preReceiveError,proto3" json:"pre_receive_error,omitempty"` @@ -2603,141 +2613,142 @@ func init() { func init() { proto.RegisterFile("operations.proto", fileDescriptor_1b4a5877375e491e) } var fileDescriptor_1b4a5877375e491e = []byte{ - // 2132 bytes of a gzipped FileDescriptorProto + // 2152 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x73, 0x1b, 0x49, - 0x15, 0xf7, 0x48, 0xb2, 0x2c, 0x3f, 0xcb, 0xb6, 0xdc, 0xf9, 0x58, 0xad, 0x12, 0x63, 0xef, 0x38, + 0x15, 0xf7, 0x48, 0xb2, 0x2c, 0x3f, 0xcb, 0xb2, 0xdc, 0xf9, 0x58, 0xad, 0x12, 0x63, 0xef, 0x38, 0x21, 0x4e, 0x58, 0x94, 0xad, 0xb0, 0x05, 0x5c, 0x16, 0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, 0x86, 0x48, 0xab, 0x97, + 0x83, 0x9e, 0x23, 0x78, 0x07, 0xbf, 0xcc, 0xdf, 0x19, 0xf0, 0xda, 0xd3, 0x80, 0x8b, 0xa6, 0xe0, + 0x4e, 0xc8, 0x37, 0x85, 0x33, 0x6c, 0xf7, 0x2c, 0xfe, 0xc1, 0x88, 0x07, 0x21, 0xfb, 0x2a, 0x80, + 0xe0, 0xbe, 0x17, 0xb8, 0xa1, 0x27, 0x4e, 0x6b, 0xc6, 0x9a, 0xb1, 0xb1, 0xf0, 0x80, 0x35, 0x50, + 0x64, 0xc3, 0x1a, 0xaf, 0x6c, 0x16, 0x7e, 0xf9, 0xf1, 0x9b, 0x86, 0x15, 0xe3, 0x65, 0xab, 0xb0, + 0x70, 0xa4, 0x44, 0xd9, 0x43, 0x67, 0xc0, 0x6b, 0xb9, 0x35, 0x63, 0xa3, 0x6c, 0x01, 0x92, 0x9e, + 0x38, 0x03, 0xce, 0xd6, 0xa0, 0x30, 0x0a, 0xb8, 0xa8, 0xe5, 0x95, 0xd0, 0x72, 0x24, 0x54, 0x6a, + 0x62, 0xa9, 0x15, 0x29, 0x22, 0x08, 0x1d, 0x11, 0xda, 0xbe, 0xe7, 0x0e, 0xc3, 0x5a, 0x01, 0x45, + 0x28, 0xd2, 0xbe, 0xa4, 0x98, 0x43, 0xa8, 0xa5, 0x15, 0x0f, 0x7c, 0x6f, 0x18, 0x70, 0xf6, 0x79, + 0x28, 0xe2, 0x66, 0xa4, 0x75, 0x25, 0xda, 0x80, 0xf8, 0x68, 0x95, 0xdd, 0x83, 0x65, 0x5f, 0x70, + 0x5b, 0xf0, 0x36, 0x77, 0x4f, 0xb8, 0xcd, 0x85, 0xf0, 0x84, 0xd2, 0x76, 0xde, 0x5a, 0xf2, 0x05, + 0xb7, 0x90, 0xde, 0x92, 0x64, 0xf3, 0x63, 0x42, 0xea, 0xa9, 0xdf, 0x79, 0xb5, 0x90, 0xba, 0x0e, + 0xc5, 0x21, 0xff, 0x50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0x57, 0x6d, 0x22, 0x50, 0x6e, 0x22, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/operations.proto b/proto/operations.proto index 30305d289..d2a2680d6 100644 --- a/proto/operations.proto +++ b/proto/operations.proto @@ -183,6 +183,9 @@ message UserMergeToRefRequest { bytes target_ref = 5; bytes message = 6; bytes first_parent_ref = 7; + // Allow conflicts to occur. Any conflict markers will be part of the merge commit. + // Only text conflicts are handled, tree-based conflicts are not supported. + bool allow_conflicts = 8; } message UserMergeToRefResponse { diff --git a/ruby/.rubocop_todo.yml b/ruby/.rubocop_todo.yml index 6f5ed7953..87453d9e6 100644 --- a/ruby/.rubocop_todo.yml +++ b/ruby/.rubocop_todo.yml @@ -91,7 +91,7 @@ Metrics/BlockLength: # Offense count: 8 # Configuration parameters: CountComments. Metrics/ClassLength: - Max: 687 + Max: 699 # Offense count: 7 # Configuration parameters: IgnoredMethods. diff --git a/ruby/lib/gitaly_server/operations_service.rb b/ruby/lib/gitaly_server/operations_service.rb index f85ba5c9c..dd03ac74f 100644 --- a/ruby/lib/gitaly_server/operations_service.rb +++ b/ruby/lib/gitaly_server/operations_service.rb @@ -104,7 +104,7 @@ module GitalyServer repo = Gitlab::Git::Repository.from_gitaly(request.repository, call) user = Gitlab::Git::User.from_gitaly(request.user) - commit_id = repo.merge_to_ref(user, request.source_sha, request.branch, request.target_ref, request.message.dup, request.first_parent_ref) + commit_id = repo.merge_to_ref(user, request.source_sha, request.branch, request.target_ref, request.message.dup, request.first_parent_ref, request.allow_conflicts) Gitaly::UserMergeToRefResponse.new(commit_id: commit_id) rescue Gitlab::Git::CommitError => e diff --git a/ruby/lib/gitlab/git/repository.rb b/ruby/lib/gitlab/git/repository.rb index e34683e12..2dc164f5f 100644 --- a/ruby/lib/gitlab/git/repository.rb +++ b/ruby/lib/gitlab/git/repository.rb @@ -277,7 +277,7 @@ module Gitlab tags.find { |tag| tag.name.b == name_b } end - def merge_to_ref(user, source_sha, branch, target_ref, message, first_parent_ref) + def merge_to_ref(user, source_sha, branch, target_ref, message, first_parent_ref, allow_conflicts = false) ref = if first_parent_ref.present? find_ref(first_parent_ref) else @@ -290,7 +290,7 @@ module Gitlab our_commit = ref.target their_commit = source_sha - create_merge_commit(user, our_commit, their_commit, message) + create_merge_commit(user, our_commit, their_commit, message, allow_conflicts) end rescue Rugged::ReferenceError, InvalidRef raise ArgumentError, 'Invalid merge source' @@ -745,14 +745,16 @@ module Gitlab run_git!(%w[config core.sparseCheckout false], include_stderr: true) end - def create_merge_commit(user, our_commit, their_commit, message) + def create_merge_commit(user, our_commit, their_commit, message, allow_conflicts = false) raise 'Invalid merge target' unless our_commit raise 'Invalid merge source' unless their_commit committer = user_to_committer(user) merge_index = rugged.merge_commits(our_commit, their_commit) - return if merge_index.conflicts? + process_conflicts(rugged, merge_index, allow_conflicts) + + return if merge_index.conflicts? # some conflicts are still unresolved options = { parents: [our_commit, their_commit], @@ -765,6 +767,19 @@ module Gitlab create_commit(options) end + def process_conflicts(rugged, merge_index, allow_conflicts) + return unless allow_conflicts + + merge_index.conflicts.each do |conflict| + path = conflict[:ancestor][:path] + file = merge_index.merge_file(path) + merge_index.add(path: path, oid: rugged.write(file[:data], :blob), mode: file[:filemode]) + merge_index.conflict_remove(path) + end + rescue RuntimeError # conflicts cannot be resolved + nil + end + def run_git(args, chdir: path, env: {}, nice: false, include_stderr: false, lazy_block: nil, &block) cmd = [Gitlab.config.git.bin_path, *args] cmd.unshift("nice") if nice diff --git a/ruby/proto/gitaly/operations_pb.rb b/ruby/proto/gitaly/operations_pb.rb index b1604c8a6..b83e453be 100644 --- a/ruby/proto/gitaly/operations_pb.rb +++ b/ruby/proto/gitaly/operations_pb.rb @@ -76,6 +76,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :target_ref, :bytes, 5 optional :message, :bytes, 6 optional :first_parent_ref, :bytes, 7 + optional :allow_conflicts, :bool, 8 end add_message "gitaly.UserMergeToRefResponse" do optional :commit_id, :string, 1 |