Commit 53632102 authored by Thong Kuah's avatar Thong Kuah

Remove redundant allow_cross_joins_across_databases call

This issue has been resolved so we do not need this allowlist.
parent 5a279697
......@@ -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
render
end
......@@ -201,7 +199,6 @@ 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)
......@@ -212,7 +209,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
}
}
end
end
def sast_reports
reports_response(merge_request.compare_sast_reports(current_user), head_pipeline)
......
......@@ -1409,10 +1409,8 @@ 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
end
def branch_missing?
!source_branch_exists? || !target_branch_exists?
......@@ -1912,10 +1910,8 @@ 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
end
def etag_caching_enabled?
true
......
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