summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2019-01-02 16:21:17 +0100
committerAndreas Brandl <abrandl@gitlab.com>2019-01-29 15:38:40 +0100
commit4ac06d344b8587ec3abdf2920f838babf7c6c324 (patch)
tree0776c838e8cc614bc2deb2ad6a7d0658b06bb6c0
parent820739eb09a0182054a7713271a70b912c4a7e27 (diff)
downloadgitlab-ce-4ac06d344b8587ec3abdf2920f838babf7c6c324.tar.gz
Revert " Trigger iid logic from GitHub importer for merge requests."
This reverts commit fb98496f49bbb324b808523ea97f0844682fe1ac.
-rw-r--r--lib/gitlab/import/merge_request_helpers.rb4
-rw-r--r--spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb10
2 files changed, 0 insertions, 14 deletions
diff --git a/lib/gitlab/import/merge_request_helpers.rb b/lib/gitlab/import/merge_request_helpers.rb
index 9215067d973..fa3ff6c3f12 100644
--- a/lib/gitlab/import/merge_request_helpers.rb
+++ b/lib/gitlab/import/merge_request_helpers.rb
@@ -24,10 +24,6 @@ module Gitlab
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]
end
rescue ActiveRecord::InvalidForeignKey
diff --git a/spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb b/spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb
index 25684ea9e2c..0f21b8843b6 100644
--- a/spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb
@@ -111,16 +111,6 @@ describe Gitlab::GithubImport::Importer::PullRequestImporter, :clean_gitlab_redi
expect(mr).to be_instance_of(MergeRequest)
expect(exists).to eq(false)
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
context 'when the author could not be found' do