Commit eab7b454 authored by Nikola Milojevic's avatar Nikola Milojevic

Merge branch 'allowlist_any_online_runners_callsite' into 'master'

Allow callsite in project for cross-database queries

See merge request gitlab-org/gitlab!69447
parents 722f8c94 16c9a2f4
......@@ -1791,7 +1791,9 @@ class Project < ApplicationRecord
end
def any_online_runners?(&block)
online_runners_with_tags.any?(&block)
::Gitlab::Database.allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/339937') do
online_runners_with_tags.any?(&block)
end
end
def valid_runners_token?(token)
......@@ -2897,12 +2899,8 @@ class Project < ApplicationRecord
update_column(:has_external_issue_tracker, integrations.external_issue_trackers.any?) if Gitlab::Database.read_write?
end
def active_runners_with_tags
@active_runners_with_tags ||= active_runners.with_tags
end
def online_runners_with_tags
@online_runners_with_tags ||= active_runners_with_tags.online
@online_runners_with_tags ||= active_runners.with_tags.online
end
end
......
......@@ -75,7 +75,6 @@
- "./ee/spec/requests/api/vulnerability_findings_spec.rb"
- "./ee/spec/serializers/dashboard_environment_entity_spec.rb"
- "./ee/spec/serializers/dashboard_environments_serializer_spec.rb"
- "./ee/spec/serializers/dashboard_operations_project_entity_spec.rb"
- "./ee/spec/serializers/ee/build_details_entity_spec.rb"
- "./ee/spec/serializers/merge_request_poll_widget_entity_spec.rb"
- "./ee/spec/services/auto_merge/add_to_merge_train_when_pipeline_succeeds_service_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