Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e1d3a980
Commit
e1d3a980
authored
Dec 06, 2021
by
Francisco Javier López
Committed by
Douglas Barbosa Alexandre
Dec 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable linear version `ci_owned_runners`
parent
113dc497
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
209 additions
and
235 deletions
+209
-235
app/models/user.rb
app/models/user.rb
+1
-7
config/feature_flags/development/linear_user_ci_owned_runners.yml
...eature_flags/development/linear_user_ci_owned_runners.yml
+0
-8
spec/models/user_spec.rb
spec/models/user_spec.rb
+208
-220
No files found.
app/models/user.rb
View file @
e1d3a980
...
...
@@ -1614,14 +1614,8 @@ class User < ApplicationRecord
.
joins
(
:runner
)
.
select
(
'ci_runners.*'
)
base_and_descendants
=
if
Feature
.
enabled?
(
:linear_user_ci_owned_runners
,
self
,
default_enabled: :yaml
)
owned_groups
.
self_and_descendant_ids
else
Gitlab
::
ObjectHierarchy
.
new
(
owned_groups
).
base_and_descendants
.
select
(
:id
)
end
group_runners
=
Ci
::
RunnerNamespace
.
where
(
namespace_id:
base_and_descendant
s
)
.
where
(
namespace_id:
owned_groups
.
self_and_descendant_id
s
)
.
joins
(
:runner
)
.
select
(
'ci_runners.*'
)
...
...
config/feature_flags/development/linear_user_ci_owned_runners.yml
deleted
100644 → 0
View file @
113dc497
---
name
:
linear_user_ci_owned_runners
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68848
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/339435
milestone
:
'
14.6'
type
:
development
group
:
group::access
default_enabled
:
false
spec/models/user_spec.rb
View file @
e1d3a980
...
...
@@ -3723,7 +3723,6 @@ RSpec.describe User do
end
describe
'#ci_owned_runners'
do
shared_examples
'ci_owned_runners examples'
do
let
(
:user
)
{
create
(
:user
)
}
shared_examples
:nested_groups_owner
do
...
...
@@ -4030,17 +4029,6 @@ RSpec.describe User do
end
end
it_behaves_like
'ci_owned_runners examples'
context
'when feature flag :linear_user_ci_owned_runners is disabled'
do
before
do
stub_feature_flags
(
linear_user_ci_owned_runners:
false
)
end
it_behaves_like
'ci_owned_runners examples'
end
end
describe
'#projects_with_reporter_access_limited_to'
do
let
(
:project1
)
{
create
(
:project
)
}
let
(
:project2
)
{
create
(
:project
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment