Commit d756db7f authored by Thong Kuah's avatar Thong Kuah

Allowlist merge request callsite for cross-db query

This accounted for thousands of calls in our CI file. Remove a spec from
the spec allowlist that was tested to work locally
parent 5d585f9c
...@@ -1349,7 +1349,9 @@ class MergeRequest < ApplicationRecord ...@@ -1349,7 +1349,9 @@ class MergeRequest < ApplicationRecord
def has_ci? def has_ci?
return false if has_no_commits? 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 end
def branch_missing? def branch_missing?
...@@ -1836,7 +1838,9 @@ class MergeRequest < ApplicationRecord ...@@ -1836,7 +1838,9 @@ class MergeRequest < ApplicationRecord
end end
def find_actual_head_pipeline 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 end
def etag_caching_enabled? def etag_caching_enabled?
......
...@@ -329,7 +329,6 @@ ...@@ -329,7 +329,6 @@
- "./spec/requests/projects/cycle_analytics_events_spec.rb" - "./spec/requests/projects/cycle_analytics_events_spec.rb"
- "./spec/serializers/build_details_entity_spec.rb" - "./spec/serializers/build_details_entity_spec.rb"
- "./spec/serializers/ci/pipeline_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/merge_request_serializer_spec.rb"
- "./spec/serializers/pipeline_details_entity_spec.rb" - "./spec/serializers/pipeline_details_entity_spec.rb"
- "./spec/serializers/pipeline_serializer_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