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
ee372cb8
Commit
ee372cb8
authored
Sep 04, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
17c09f33
0fad0ed8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
4 deletions
+25
-4
app/services/clusters/applications/check_installation_progress_service.rb
...sters/applications/check_installation_progress_service.rb
+4
-0
app/services/clusters/applications/check_uninstall_progress_service.rb
...clusters/applications/check_uninstall_progress_service.rb
+5
-1
changelogs/unreleased/fix-regression-remove-installation-pod.yml
...ogs/unreleased/fix-regression-remove-installation-pod.yml
+5
-0
spec/services/clusters/applications/check_installation_progress_service_spec.rb
.../applications/check_installation_progress_service_spec.rb
+5
-1
spec/services/clusters/applications/check_uninstall_progress_service_spec.rb
...ers/applications/check_uninstall_progress_service_spec.rb
+6
-2
No files found.
app/services/clusters/applications/check_installation_progress_service.rb
View file @
ee372cb8
...
...
@@ -33,6 +33,10 @@ module Clusters
def
timed_out?
Time
.
now
.
utc
-
app
.
updated_at
.
utc
>
ClusterWaitForAppInstallationWorker
::
TIMEOUT
end
def
remove_installation_pod
helm_api
.
delete_pod!
(
pod_name
)
end
end
end
end
app/services/clusters/applications/check_uninstall_progress_service.rb
View file @
ee372cb8
...
...
@@ -15,7 +15,7 @@ module Clusters
rescue
StandardError
=>
e
app
.
make_errored!
(
_
(
'Application uninstalled but failed to destroy: %{error_message}'
)
%
{
error_message:
e
.
message
})
ensure
remove_installation_pod
remove_
un
installation_pod
end
def
check_timeout
...
...
@@ -33,6 +33,10 @@ module Clusters
def
timed_out?
Time
.
now
.
utc
-
app
.
updated_at
.
utc
>
WaitForUninstallAppWorker
::
TIMEOUT
end
def
remove_uninstallation_pod
helm_api
.
delete_pod!
(
pod_name
)
end
end
end
end
changelogs/unreleased/fix-regression-remove-installation-pod.yml
0 → 100644
View file @
ee372cb8
---
title
:
Fix removal of install pods
merge_request
:
32667
author
:
type
:
fixed
spec/services/clusters/applications/check_installation_progress_service_spec.rb
View file @
ee372cb8
...
...
@@ -142,7 +142,11 @@ describe Clusters::Applications::CheckInstallationProgressService, '#execute' do
end
it
'removes the installation POD'
do
expect
(
service
).
to
receive
(
:remove_installation_pod
).
once
expect_any_instance_of
(
Gitlab
::
Kubernetes
::
Helm
::
Api
)
.
to
receive
(
:delete_pod!
)
.
with
(
kind_of
(
String
))
.
once
expect
(
service
).
to
receive
(
:remove_installation_pod
).
and_call_original
service
.
execute
end
...
...
spec/services/clusters/applications/check_uninstall_progress_service_spec.rb
View file @
ee372cb8
...
...
@@ -47,11 +47,15 @@ describe Clusters::Applications::CheckUninstallProgressService do
context
'when installation POD succeeded'
do
let
(
:phase
)
{
Gitlab
::
Kubernetes
::
Pod
::
SUCCEEDED
}
before
do
expect_any_instance_of
(
Gitlab
::
Kubernetes
::
Helm
::
Api
)
.
to
receive
(
:delete_pod!
)
.
with
(
kind_of
(
String
))
.
once
expect
(
service
).
to
receive
(
:pod_phase
).
once
.
and_return
(
phase
)
end
it
'removes the installation POD'
do
expect
(
service
).
to
receive
(
:remove_
installation_pod
).
once
expect
(
service
).
to
receive
(
:remove_
uninstallation_pod
).
and_call_original
service
.
execute
end
...
...
@@ -76,7 +80,7 @@ describe Clusters::Applications::CheckUninstallProgressService do
end
it
'still removes the installation POD'
do
expect
(
service
).
to
receive
(
:remove_
installation_pod
).
once
expect
(
service
).
to
receive
(
:remove_
uninstallation_pod
).
and_call_original
service
.
execute
end
...
...
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