diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-05-23 15:03:01 +0300 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-31 11:56:07 +0300 |
commit | 1fcc9ad7bb60f83824e1e7ead8a0b07c459ab545 (patch) | |
tree | 6f838eb4511e1042afd39e9af81c6c41a7268037 /app/services/ci/register_job_service.rb | |
parent | 8d5d6ada5ed4630edf618f468565721be842e748 (diff) |
Fix `register_job_service_spec` failures
Diffstat (limited to 'app/services/ci/register_job_service.rb')
-rw-r--r-- | app/services/ci/register_job_service.rb | 3 |
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 |