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
53632102
Commit
53632102
authored
Apr 06, 2022
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant allow_cross_joins_across_databases call
This issue has been resolved so we do not need this allowlist.
parent
5a279697
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
19 deletions
+11
-19
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+9
-13
app/models/merge_request.rb
app/models/merge_request.rb
+2
-6
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
53632102
...
...
@@ -135,9 +135,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
set_pipeline_variables
::
Gitlab
::
Database
.
allow_cross_joins_across_databases
(
url:
'https://gitlab.com/gitlab-org/gitlab/-/issues/336891'
)
do
@number_of_pipelines
=
@pipelines
.
size
end
@number_of_pipelines
=
@pipelines
.
size
render
end
...
...
@@ -201,17 +199,15 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
Gitlab
::
PollingInterval
.
set_header
(
response
,
interval:
10_000
)
::
Gitlab
::
Database
.
allow_cross_joins_across_databases
(
url:
'https://gitlab.com/gitlab-org/gitlab/-/issues/336891'
)
do
render
json:
{
pipelines:
PipelineSerializer
.
new
(
project:
@project
,
current_user:
@current_user
)
.
with_pagination
(
request
,
response
)
.
represent
(
@pipelines
),
count:
{
all:
@pipelines
.
count
}
render
json:
{
pipelines:
PipelineSerializer
.
new
(
project:
@project
,
current_user:
@current_user
)
.
with_pagination
(
request
,
response
)
.
represent
(
@pipelines
),
count:
{
all:
@pipelines
.
count
}
end
}
end
def
sast_reports
...
...
app/models/merge_request.rb
View file @
53632102
...
...
@@ -1409,9 +1409,7 @@ class MergeRequest < ApplicationRecord
def
has_ci?
return
false
if
has_no_commits?
::
Gitlab
::
Database
.
allow_cross_joins_across_databases
(
url:
'https://gitlab.com/gitlab-org/gitlab/-/issues/336891'
)
do
!!
(
head_pipeline_id
||
all_pipelines
.
any?
||
source_project
&
.
ci_integration
)
end
!!
(
head_pipeline_id
||
all_pipelines
.
any?
||
source_project
&
.
ci_integration
)
end
def
branch_missing?
...
...
@@ -1912,9 +1910,7 @@ class MergeRequest < ApplicationRecord
end
def
find_actual_head_pipeline
::
Gitlab
::
Database
.
allow_cross_joins_across_databases
(
url:
'https://gitlab.com/gitlab-org/gitlab/-/issues/336891'
)
do
all_pipelines
.
for_sha_or_source_sha
(
diff_head_sha
).
first
end
all_pipelines
.
for_sha_or_source_sha
(
diff_head_sha
).
first
end
def
etag_caching_enabled?
...
...
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