Commit 6596a65d authored by charlie ablett's avatar charlie ablett

Merge branch 'allow_any_runners_available_callsite' into 'master'

Allow any_runners_available? callsite

See merge request gitlab-org/gitlab!69603
parents 533939f8 30468e69
...@@ -760,7 +760,9 @@ module Ci ...@@ -760,7 +760,9 @@ module Ci
def any_runners_available? def any_runners_available?
cache_for_available_runners do cache_for_available_runners do
project.active_runners.exists? ::Gitlab::Database.allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/339937') do
project.active_runners.exists?
end
end end
end end
......
...@@ -1784,6 +1784,9 @@ class Project < ApplicationRecord ...@@ -1784,6 +1784,9 @@ class Project < ApplicationRecord
Ci::Runner.from_union([runners, group_runners, available_shared_runners]) Ci::Runner.from_union([runners, group_runners, available_shared_runners])
end end
# Once issue 339937 is fixed, please search for all mentioned of
# https://gitlab.com/gitlab-org/gitlab/-/issues/339937,
# and remove the allow_cross_joins_across_databases.
def active_runners def active_runners
strong_memoize(:active_runners) do strong_memoize(:active_runners) do
all_available_runners.active all_available_runners.active
......
...@@ -75,7 +75,6 @@ ...@@ -75,7 +75,6 @@
- "./ee/spec/requests/api/vulnerability_findings_spec.rb" - "./ee/spec/requests/api/vulnerability_findings_spec.rb"
- "./ee/spec/serializers/dashboard_environment_entity_spec.rb" - "./ee/spec/serializers/dashboard_environment_entity_spec.rb"
- "./ee/spec/serializers/dashboard_environments_serializer_spec.rb" - "./ee/spec/serializers/dashboard_environments_serializer_spec.rb"
- "./ee/spec/serializers/ee/build_details_entity_spec.rb"
- "./ee/spec/serializers/merge_request_poll_widget_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" - "./ee/spec/services/auto_merge/add_to_merge_train_when_pipeline_succeeds_service_spec.rb"
- "./ee/spec/services/ci/create_pipeline_service/needs_spec.rb" - "./ee/spec/services/ci/create_pipeline_service/needs_spec.rb"
...@@ -308,7 +307,6 @@ ...@@ -308,7 +307,6 @@
- "./spec/requests/api/merge_requests_spec.rb" - "./spec/requests/api/merge_requests_spec.rb"
- "./spec/requests/api/package_files_spec.rb" - "./spec/requests/api/package_files_spec.rb"
- "./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/ci/pipeline_entity_spec.rb" - "./spec/serializers/ci/pipeline_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"
......
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