diff options
author | João Cunha <j.a.cunha@gmail.com> | 2019-09-04 23:26:57 +0000 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-09-04 23:26:57 +0000 |
commit | 2910f55aa2194af8d025f1ba8e382d7a649d53da (patch) | |
tree | bb075ab85821a764fbeb52736112844641471d0c /app/services | |
parent | d0532536daaa547df83f55261831292ed8d68ad4 (diff) | |
download | gitlab-ce-2910f55aa2194af8d025f1ba8e382d7a649d53da.tar.gz |
Bring method back that was mistakenly removed
- We're also improving specs to avoid this could happen again
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/clusters/applications/check_installation_progress_service.rb | 4 | ||||
-rw-r--r-- | app/services/clusters/applications/check_uninstall_progress_service.rb | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/services/clusters/applications/check_installation_progress_service.rb b/app/services/clusters/applications/check_installation_progress_service.rb index 65d08966802..1ce6e0c1cb0 100644 --- a/app/services/clusters/applications/check_installation_progress_service.rb +++ b/app/services/clusters/applications/check_installation_progress_service.rb @@ -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 diff --git a/app/services/clusters/applications/check_uninstall_progress_service.rb b/app/services/clusters/applications/check_uninstall_progress_service.rb index 6a618d61c4f..fe9c488bdfd 100644 --- a/app/services/clusters/applications/check_uninstall_progress_service.rb +++ b/app/services/clusters/applications/check_uninstall_progress_service.rb @@ -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_uninstallation_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 |