diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-04-10 11:29:52 +1200 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-04-12 11:27:22 +1200 |
commit | db68aceb66358fc562a277e4dd3b54849386110a (patch) | |
tree | b70bc6123bd50864040ba880b858fb264979bd4d | |
parent | ee3bad604a6d280fb31a6b0c69bb53d5b5d4f581 (diff) | |
download | gitlab-ce-refactor_cluster_application_services.tar.gz |
More accurate error messagerefactor_cluster_application_services
By the time we catch this StandardError, it's no longer the start of the
process - it could be anywhere in between.
6 files changed, 6 insertions, 6 deletions
diff --git a/app/services/clusters/applications/install_service.rb b/app/services/clusters/applications/install_service.rb index 1396db35f1e..3f4c57a3994 100644 --- a/app/services/clusters/applications/install_service.rb +++ b/app/services/clusters/applications/install_service.rb @@ -24,7 +24,7 @@ module Clusters app.make_errored!("Kubernetes error: #{e.error_code}") rescue StandardError => e log_error(e) - app.make_errored!("Can't start installation process.") + app.make_errored!('Failed to install.') end end end diff --git a/app/services/clusters/applications/patch_service.rb b/app/services/clusters/applications/patch_service.rb index 76f57f2a35a..29265119dbd 100644 --- a/app/services/clusters/applications/patch_service.rb +++ b/app/services/clusters/applications/patch_service.rb @@ -24,7 +24,7 @@ module Clusters app.make_errored!("Kubernetes error: #{e.error_code}") rescue StandardError => e log_error(e) - app.make_errored!("Can't start update process.") + app.make_errored!('Failed to update.') end end end diff --git a/app/services/clusters/applications/upgrade_service.rb b/app/services/clusters/applications/upgrade_service.rb index fc984c14a0f..0f6511f7b8b 100644 --- a/app/services/clusters/applications/upgrade_service.rb +++ b/app/services/clusters/applications/upgrade_service.rb @@ -26,7 +26,7 @@ module Clusters app.make_errored!("Kubernetes error: #{e.error_code}") rescue StandardError => e log_error(e) - app.make_errored!("Can't start upgrade process.") + app.make_errored!('Failed to upgrade.') end end end diff --git a/spec/services/clusters/applications/install_service_spec.rb b/spec/services/clusters/applications/install_service_spec.rb index 32cfbc17632..14739ff9e7c 100644 --- a/spec/services/clusters/applications/install_service_spec.rb +++ b/spec/services/clusters/applications/install_service_spec.rb @@ -71,7 +71,7 @@ describe Clusters::Applications::InstallService do service.execute expect(application).to be_errored - expect(application.status_reason).to eq("Can't start installation process.") + expect(application.status_reason).to eq('Failed to install.') end end end diff --git a/spec/services/clusters/applications/patch_service_spec.rb b/spec/services/clusters/applications/patch_service_spec.rb index 05496595d3f..3ebe0540837 100644 --- a/spec/services/clusters/applications/patch_service_spec.rb +++ b/spec/services/clusters/applications/patch_service_spec.rb @@ -73,7 +73,7 @@ describe Clusters::Applications::PatchService do service.execute expect(application).to be_update_errored - expect(application.status_reason).to eq("Can't start update process.") + expect(application.status_reason).to eq('Failed to update.') end end end diff --git a/spec/services/clusters/applications/upgrade_service_spec.rb b/spec/services/clusters/applications/upgrade_service_spec.rb index 4c9847f158b..a80b1d9127c 100644 --- a/spec/services/clusters/applications/upgrade_service_spec.rb +++ b/spec/services/clusters/applications/upgrade_service_spec.rb @@ -73,7 +73,7 @@ describe Clusters::Applications::UpgradeService do service.execute expect(application).to be_update_errored - expect(application.status_reason).to eq("Can't start upgrade process.") + expect(application.status_reason).to eq('Failed to upgrade.') end end end |