diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/services/clusters/applications/check_progress_service.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/services/clusters/applications/check_progress_service.rb')
-rw-r--r-- | app/services/clusters/applications/check_progress_service.rb | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/app/services/clusters/applications/check_progress_service.rb b/app/services/clusters/applications/check_progress_service.rb deleted file mode 100644 index 4a07b955f8e..00000000000 --- a/app/services/clusters/applications/check_progress_service.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -module Clusters - module Applications - class CheckProgressService < BaseHelmService - def execute - return unless operation_in_progress? - - case pod_phase - when Gitlab::Kubernetes::Pod::SUCCEEDED - on_success - when Gitlab::Kubernetes::Pod::FAILED - on_failed - else - check_timeout - end - rescue Kubeclient::HttpError => e - log_error(e) - - app.make_errored!(_('Kubernetes error: %{error_code}') % { error_code: e.error_code }) - end - - private - - def operation_in_progress? - raise NotImplementedError - end - - def on_success - raise NotImplementedError - end - - def pod_name - raise NotImplementedError - end - - def on_failed - app.make_errored!(_('Operation failed. Check pod logs for %{pod_name} for more details.') % { pod_name: pod_name }) - end - - def timed_out? - raise NotImplementedError - end - - def pod_phase - helm_api.status(pod_name) - end - end - end -end |