don't filter group runners by project flag
the scope `Ci::Runner.belonging_to_group` does not filter out the runners where the projects has `#group_runners_enabled` set to false anymore. it didn't show up in the runners UI anymore when group runners were disabled. this was confusing. the flag is only relevant when selecting appropriate runner for a build.
This commit is contained in:
parent
4ccf734e38
commit
d588adff1a
2 changed files with 1 additions and 17 deletions
|
@ -37,15 +37,7 @@ module Ci
|
|||
INNER JOIN namespaces ON namespaces.id = ci_runner_groups.group_id
|
||||
INNER JOIN projects ON projects.namespace_id = namespaces.id
|
||||
}
|
||||
).where(
|
||||
%{
|
||||
projects.id = :project_id
|
||||
AND
|
||||
projects.group_runners_enabled = :true
|
||||
},
|
||||
project_id: project_id,
|
||||
true: true
|
||||
)
|
||||
).where('projects.id = :project_id', project_id: project_id)
|
||||
}
|
||||
|
||||
scope :owned_or_shared, -> (project_id) do
|
||||
|
|
|
@ -93,14 +93,6 @@ describe Ci::Runner do
|
|||
|
||||
expect(described_class.belonging_to_group(specific_project.id)).to eq [specific_runner]
|
||||
end
|
||||
|
||||
it 'does not return the group runner if the project has group runners disabled' do
|
||||
specific_group = create :group
|
||||
specific_project = create :project, group: specific_group, group_runners_enabled: false
|
||||
create :ci_runner, :specific, groups: [specific_group]
|
||||
|
||||
expect(described_class.belonging_to_group(specific_project.id)).to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
describe '.owned_or_shared' do
|
||||
|
|
Loading…
Reference in a new issue