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
8507897f
Commit
8507897f
authored
Aug 07, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
b537b92f
55da8b27
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
app/services/projects/destroy_service.rb
app/services/projects/destroy_service.rb
+1
-0
changelogs/unreleased/sh-disable-registry-delete.yml
changelogs/unreleased/sh-disable-registry-delete.yml
+5
-0
spec/services/projects/destroy_service_spec.rb
spec/services/projects/destroy_service_spec.rb
+12
-0
No files found.
app/services/projects/destroy_service.rb
View file @
8507897f
...
@@ -173,6 +173,7 @@ module Projects
...
@@ -173,6 +173,7 @@ module Projects
end
end
def
remove_registry_tags
def
remove_registry_tags
return
true
unless
Gitlab
.
config
.
registry
.
enabled
return
false
unless
remove_legacy_registry_tags
return
false
unless
remove_legacy_registry_tags
project
.
container_repositories
.
find_each
do
|
container_repository
|
project
.
container_repositories
.
find_each
do
|
container_repository
|
...
...
changelogs/unreleased/sh-disable-registry-delete.yml
0 → 100644
View file @
8507897f
---
title
:
Don't attempt to contact registry if it is disabled
merge_request
:
31553
author
:
type
:
fixed
spec/services/projects/destroy_service_spec.rb
View file @
8507897f
...
@@ -241,6 +241,18 @@ describe Projects::DestroyService do
...
@@ -241,6 +241,18 @@ describe Projects::DestroyService do
expect
(
destroy_project
(
project
,
user
)).
to
be
false
expect
(
destroy_project
(
project
,
user
)).
to
be
false
end
end
end
end
context
'when registry is disabled'
do
before
do
stub_container_registry_config
(
enabled:
false
)
end
it
'does not attempting to remove any tags'
do
expect
(
Projects
::
ContainerRepository
::
DestroyService
).
not_to
receive
(
:new
)
destroy_project
(
project
,
user
)
end
end
end
end
context
'when there are tags for legacy root repository'
do
context
'when there are tags for legacy root repository'
do
...
...
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