Commit 76f9e2bd authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'allowlist_merge_request_callsite' into 'master'

Allowlist callsites in `merge_request.rb` for cross-db query

See merge request gitlab-org/gitlab!69426
parents c18c8eff d756db7f
......@@ -1349,7 +1349,9 @@ class MergeRequest < ApplicationRecord
def has_ci?
return false if has_no_commits?
!!(head_pipeline_id || all_pipelines.any? || source_project&.ci_integration)
::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?
......@@ -1836,7 +1838,9 @@ class MergeRequest < ApplicationRecord
end
def find_actual_head_pipeline
all_pipelines.for_sha_or_source_sha(diff_head_sha).first
::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?
......
......@@ -329,7 +329,6 @@
- "./spec/requests/projects/cycle_analytics_events_spec.rb"
- "./spec/serializers/build_details_entity_spec.rb"
- "./spec/serializers/ci/pipeline_entity_spec.rb"
- "./spec/serializers/merge_request_poll_widget_entity_spec.rb"
- "./spec/serializers/merge_request_serializer_spec.rb"
- "./spec/serializers/pipeline_details_entity_spec.rb"
- "./spec/serializers/pipeline_serializer_spec.rb"
......
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