summaryrefslogtreecommitdiff
path: root/app/models/clusters/concerns
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-04-12 17:28:06 +1200
committerStan Hu <stanhu@gmail.com>2019-04-29 22:55:11 -0700
commit3c8df0c944f0b23f9ee8b6b08a0a355b00456dd9 (patch)
treee17c11245edf069af55f97c3b9df1544c33db57a /app/models/clusters/concerns
parent938e90f47288901790a96c50a8c0dfa2b7eab137 (diff)
downloadgitlab-ce-3c8df0c944f0b23f9ee8b6b08a0a355b00456dd9.tar.gz
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/models/clusters/concerns')
-rw-r--r--app/models/clusters/concerns/application_status.rb5
1 files changed, 0 insertions, 5 deletions
diff --git a/app/models/clusters/concerns/application_status.rb b/app/models/clusters/concerns/application_status.rb
index 16679a21e64..54a3dda6d75 100644
--- a/app/models/clusters/concerns/application_status.rb
+++ b/app/models/clusters/concerns/application_status.rb
@@ -27,7 +27,6 @@ module Clusters
state :update_errored, value: 6
state :uninstalling, value: 7
state :uninstall_errored, value: 8
- state :uninstalled, value: 9
event :make_scheduled do
transition [:installable, :errored, :installed, :updated, :update_errored, :uninstall_errored] => :scheduled
@@ -60,10 +59,6 @@ module Clusters
transition [:scheduled] => :uninstalling
end
- event :make_uninstalled do
- transition [:uninstalling] => :uninstalled
- end
-
before_transition any => [:scheduled] do |app_status, _|
app_status.status_reason = nil
end