Открыть боковую панель
nt_test133
nt_project_uxpg8lvcuq8w
Коммиты
c2a6ecc8
Коммит
c2a6ecc8
создал
Сен 04, 2019
по автору
João Cunha
Просмотр файлов
Bring method back that was mistakenly removed
- We're also improving specs to avoid this could happen again
владелец
c3c5d6fb
Изменения
5
Скрыть пробелы
Построчно
Рядом
app/services/clusters/applications/check_installation_progress_service.rb
Просмотр файла @
c2a6ecc8
...
...
@@ -33,6 +33,10 @@ def pod_name
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
Просмотр файла @
c2a6ecc8
...
...
@@ -15,7 +15,7 @@ def on_success
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 @@ def pod_name
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
Просмотр файла @
c2a6ecc8
---
title
:
Fix removal of install pods
merge_request
:
32695
author
:
type
:
fixed
spec/services/clusters/applications/check_installation_progress_service_spec.rb
Просмотр файла @
c2a6ecc8
...
...
@@ -142,7 +142,11 @@
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
Просмотр файла @
c2a6ecc8
...
...
@@ -47,11 +47,15 @@
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_
un
installation_pod
).
and_call_original
service
.
execute
end
...
...
@@ -76,7 +80,7 @@
end
it
'still removes the installation POD'
do
expect
(
service
).
to
receive
(
:remove_installation_pod
).
once
expect
(
service
).
to
receive
(
:remove_
un
installation_pod
).
and_call_original
service
.
execute
end
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать