Commit 51b81434 authored by Mike Kozono's avatar Mike Kozono Committed by Mike Kozono

Move query limit exception to EE only

No longer needed in FOSS because queries are again below the threshold.
parent a137fece
...@@ -6,7 +6,6 @@ class Projects::MergeRequests::CreationsController < Projects::MergeRequests::Ap ...@@ -6,7 +6,6 @@ class Projects::MergeRequests::CreationsController < Projects::MergeRequests::Ap
include RendersCommits include RendersCommits
skip_before_action :merge_request skip_before_action :merge_request
before_action :disable_query_limiting, only: [:create]
before_action :authorize_create_merge_request_from! before_action :authorize_create_merge_request_from!
before_action :apply_diff_view_cookie!, only: [:diffs, :diff_for_path] before_action :apply_diff_view_cookie!, only: [:diffs, :diff_for_path]
before_action :build_merge_request, except: [:create] before_action :build_merge_request, except: [:create]
...@@ -133,13 +132,11 @@ class Projects::MergeRequests::CreationsController < Projects::MergeRequests::Ap ...@@ -133,13 +132,11 @@ class Projects::MergeRequests::CreationsController < Projects::MergeRequests::Ap
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
def disable_query_limiting
Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/20801')
end
def incr_count_webide_merge_request def incr_count_webide_merge_request
return if params[:nav_source] != 'webide' return if params[:nav_source] != 'webide'
Gitlab::UsageDataCounters::WebIdeCounter.increment_merge_requests_count Gitlab::UsageDataCounters::WebIdeCounter.increment_merge_requests_count
end end
end end
Projects::MergeRequests::CreationsController.prepend_ee_mod
# frozen_string_literal: true
module EE
module Projects
module MergeRequests
module CreationsController
extend ActiveSupport::Concern
prepended do
before_action :disable_query_limiting, only: [:create]
end
private
def disable_query_limiting
::Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/20801')
end
end
end
end
end
...@@ -139,5 +139,11 @@ RSpec.describe Projects::MergeRequests::CreationsController do ...@@ -139,5 +139,11 @@ RSpec.describe Projects::MergeRequests::CreationsController do
end end
end end
end end
it 'disables query limiting' do
expect(Gitlab::QueryLimiting).to receive(:disable!)
create_merge_request
end
end end
end end
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