summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorKamil TrzciƄski <ayufan@ayufan.eu>2018-05-23 14:03:01 +0200
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-31 10:56:07 +0200
commit1fcc9ad7bb60f83824e1e7ead8a0b07c459ab545 (patch)
tree6f838eb4511e1042afd39e9af81c6c41a7268037 /app/services
parent8d5d6ada5ed4630edf618f468565721be842e748 (diff)
downloadgitlab-ce-1fcc9ad7bb60f83824e1e7ead8a0b07c459ab545.tar.gz
Fix `register_job_service_spec` failures
Diffstat (limited to 'app/services')
-rw-r--r--app/services/ci/register_job_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/ci/register_job_service.rb b/app/services/ci/register_job_service.rb
index 28b97e3da67..317d1defbba 100644
--- a/app/services/ci/register_job_service.rb
+++ b/app/services/ci/register_job_service.rb
@@ -90,7 +90,8 @@ module Ci
def builds_for_group_runner
# Workaround for weird Rails bug, that makes `runner.groups.to_sql` to return `runner_id = NULL`
- groups = Group.joins(:runner_namespaces).where(runner_namespaces: { runner_id: runner })
+ groups = Group.joins(:runner_namespaces).merge(runner.runner_namespaces)
+
hierarchy_groups = Gitlab::GroupHierarchy.new(groups).base_and_descendants
projects = Project.where(namespace_id: hierarchy_groups)
.with_group_runners_enabled