Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
51b81434
Commit
51b81434
authored
Mar 25, 2021
by
Mike Kozono
Committed by
Mike Kozono
Mar 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move query limit exception to EE only
No longer needed in FOSS because queries are again below the threshold.
parent
a137fece
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
5 deletions
+29
-5
app/controllers/projects/merge_requests/creations_controller.rb
...ntrollers/projects/merge_requests/creations_controller.rb
+2
-5
ee/app/controllers/ee/projects/merge_requests/creations_controller.rb
...ollers/ee/projects/merge_requests/creations_controller.rb
+21
-0
ee/spec/controllers/projects/merge_requests/creations_controller_spec.rb
...lers/projects/merge_requests/creations_controller_spec.rb
+6
-0
No files found.
app/controllers/projects/merge_requests/creations_controller.rb
View file @
51b81434
...
...
@@ -6,7 +6,6 @@ class Projects::MergeRequests::CreationsController < Projects::MergeRequests::Ap
include
RendersCommits
skip_before_action
:merge_request
before_action
:disable_query_limiting
,
only:
[
:create
]
before_action
:authorize_create_merge_request_from!
before_action
:apply_diff_view_cookie!
,
only:
[
:diffs
,
:diff_for_path
]
before_action
:build_merge_request
,
except:
[
:create
]
...
...
@@ -133,13 +132,11 @@ class Projects::MergeRequests::CreationsController < Projects::MergeRequests::Ap
end
# 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
return
if
params
[
:nav_source
]
!=
'webide'
Gitlab
::
UsageDataCounters
::
WebIdeCounter
.
increment_merge_requests_count
end
end
Projects
::
MergeRequests
::
CreationsController
.
prepend_ee_mod
ee/app/controllers/ee/projects/merge_requests/creations_controller.rb
0 → 100644
View file @
51b81434
# 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
ee/spec/controllers/projects/merge_requests/creations_controller_spec.rb
View file @
51b81434
...
...
@@ -139,5 +139,11 @@ RSpec.describe Projects::MergeRequests::CreationsController do
end
end
end
it
'disables query limiting'
do
expect
(
Gitlab
::
QueryLimiting
).
to
receive
(
:disable!
)
create_merge_request
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment