Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-20 12:10:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-20 12:10:20 +0300
commit3f96425b0b9f0b4885b70db01dcd76b311ea87ab (patch)
tree0f42e42ca0876d9deca1d9cda83165ec510876e5 /app/services/clusters
parentba2e4183d9b07237657595821cd06689667e6762 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/clusters')
-rw-r--r--app/services/clusters/applications/check_uninstall_progress_service.rb42
1 files changed, 0 insertions, 42 deletions
diff --git a/app/services/clusters/applications/check_uninstall_progress_service.rb b/app/services/clusters/applications/check_uninstall_progress_service.rb
deleted file mode 100644
index cd213c3ebbf..00000000000
--- a/app/services/clusters/applications/check_uninstall_progress_service.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# frozen_string_literal: true
-
-module Clusters
- module Applications
- class CheckUninstallProgressService < CheckProgressService
- private
-
- def operation_in_progress?
- app.uninstalling?
- end
-
- def on_success
- app.post_uninstall
- app.destroy!
- rescue StandardError => e
- app.make_errored!(_('Application uninstalled but failed to destroy: %{error_message}') % { error_message: e.message })
- ensure
- remove_uninstallation_pod
- end
-
- def check_timeout
- if timed_out?
- app.make_errored!(_('Operation timed out. Check pod logs for %{pod_name} for more details.') % { pod_name: pod_name })
- else
- WaitForUninstallAppWorker.perform_in(WaitForUninstallAppWorker::INTERVAL, app.name, app.id)
- end
- end
-
- def pod_name
- app.uninstall_command.pod_name
- end
-
- def timed_out?
- Time.current.utc - app.updated_at.utc > WaitForUninstallAppWorker::TIMEOUT
- end
-
- def remove_uninstallation_pod
- helm_api.delete_pod!(pod_name)
- end
- end
- end
-end