diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-04-12 08:28:06 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-04-30 08:55:11 +0300 |
commit | 3c8df0c944f0b23f9ee8b6b08a0a355b00456dd9 (patch) | |
tree | e17c11245edf069af55f97c3b9df1544c33db57a /app/services/clusters/applications | |
parent | 938e90f47288901790a96c50a8c0dfa2b7eab137 (diff) |
Destroy app on successful uninstallation
Rescue and put into :uninstall_errored if something goes wrong while
destroying, which can happen. I think it is safe to expose the full
error message from the destroy error.
Remove the :uninstalled state as no longer used.
Diffstat (limited to 'app/services/clusters/applications')
-rw-r--r-- | app/services/clusters/applications/check_uninstall_progress_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/clusters/applications/check_uninstall_progress_service.rb b/app/services/clusters/applications/check_uninstall_progress_service.rb index 2a2594a30c8..efb2bb1b67d 100644 --- a/app/services/clusters/applications/check_uninstall_progress_service.rb +++ b/app/services/clusters/applications/check_uninstall_progress_service.rb @@ -23,7 +23,9 @@ module Clusters private def on_success - app.make_uninstalled! + app.destroy! + rescue StandardError => e + app.make_errored!("Application uninstalled but failed to destroy: #{e.message}") ensure remove_installation_pod end |