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
4b78157a
Commit
4b78157a
authored
Oct 02, 2020
by
David Fernandez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the `container_registry_cleanup` feature flag
It has been enabled by default for a few milestones
parent
9cd8f37f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
14 deletions
+0
-14
app/services/projects/container_repository/cleanup_tags_service.rb
...ces/projects/container_repository/cleanup_tags_service.rb
+0
-5
config/feature_flags/development/container_registry_cleanup.yml
.../feature_flags/development/container_registry_cleanup.yml
+0
-7
spec/services/projects/container_repository/cleanup_tags_service_spec.rb
...rojects/container_repository/cleanup_tags_service_spec.rb
+0
-2
No files found.
app/services/projects/container_repository/cleanup_tags_service.rb
View file @
4b78157a
...
@@ -4,7 +4,6 @@ module Projects
...
@@ -4,7 +4,6 @@ module Projects
module
ContainerRepository
module
ContainerRepository
class
CleanupTagsService
<
BaseService
class
CleanupTagsService
<
BaseService
def
execute
(
container_repository
)
def
execute
(
container_repository
)
return
error
(
'feature disabled'
)
unless
can_use?
return
error
(
'access denied'
)
unless
can_destroy?
return
error
(
'access denied'
)
unless
can_destroy?
return
error
(
'invalid regex'
)
unless
valid_regex?
return
error
(
'invalid regex'
)
unless
valid_regex?
...
@@ -74,10 +73,6 @@ module Projects
...
@@ -74,10 +73,6 @@ module Projects
can?
(
current_user
,
:destroy_container_image
,
project
)
can?
(
current_user
,
:destroy_container_image
,
project
)
end
end
def
can_use?
Feature
.
enabled?
(
:container_registry_cleanup
,
project
,
default_enabled:
true
)
end
def
valid_regex?
def
valid_regex?
%w(name_regex_delete name_regex name_regex_keep)
.
each
do
|
param_name
|
%w(name_regex_delete name_regex name_regex_keep)
.
each
do
|
param_name
|
regex
=
params
[
param_name
]
regex
=
params
[
param_name
]
...
...
config/feature_flags/development/container_registry_cleanup.yml
deleted
100644 → 0
View file @
9cd8f37f
---
name
:
container_registry_cleanup
introduced_by_url
:
rollout_issue_url
:
group
:
type
:
development
default_enabled
:
true
spec/services/projects/container_repository/cleanup_tags_service_spec.rb
View file @
4b78157a
...
@@ -12,8 +12,6 @@ RSpec.describe Projects::ContainerRepository::CleanupTagsService do
...
@@ -12,8 +12,6 @@ RSpec.describe Projects::ContainerRepository::CleanupTagsService do
before
do
before
do
project
.
add_maintainer
(
user
)
project
.
add_maintainer
(
user
)
stub_feature_flags
(
container_registry_cleanup:
true
)
stub_container_registry_config
(
enabled:
true
)
stub_container_registry_config
(
enabled:
true
)
stub_container_registry_tags
(
stub_container_registry_tags
(
...
...
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