Commit 4ac06d34 authored by Andreas Brandl's avatar Andreas Brandl

Revert " Trigger iid logic from GitHub importer for merge requests."

This reverts commit fb98496f.
parent 820739eb
...@@ -24,10 +24,6 @@ module Gitlab ...@@ -24,10 +24,6 @@ module Gitlab
merge_request = project.merge_requests.reload.find(merge_request_id) merge_request = project.merge_requests.reload.find(merge_request_id)
# We use .insert_and_return_id which effectively disables all callbacks.
# Trigger iid logic here to make sure we track internal id values consistently.
merge_request.ensure_target_project_iid!
[merge_request, false] [merge_request, false]
end end
rescue ActiveRecord::InvalidForeignKey rescue ActiveRecord::InvalidForeignKey
......
...@@ -111,16 +111,6 @@ describe Gitlab::GithubImport::Importer::PullRequestImporter, :clean_gitlab_redi ...@@ -111,16 +111,6 @@ describe Gitlab::GithubImport::Importer::PullRequestImporter, :clean_gitlab_redi
expect(mr).to be_instance_of(MergeRequest) expect(mr).to be_instance_of(MergeRequest)
expect(exists).to eq(false) expect(exists).to eq(false)
end end
it 'triggers internal_id functionality to track greatest iids' do
mr = build_stubbed(:merge_request, source_project: project, target_project: project)
allow(importer).to receive(:insert_and_return_id).and_return(mr.id)
allow(project.merge_requests).to receive(:find).with(mr.id).and_return(mr)
expect(mr).to receive(:ensure_target_project_iid!)
importer.create_merge_request
end
end end
context 'when the author could not be found' do context 'when the author could not be found' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment