Do not persist errors from Kubernetes calls
This commit is contained in:
parent
bff85a4b1c
commit
6f0b7a39eb
|
@ -14,8 +14,8 @@ module Clusters
|
|||
else
|
||||
check_timeout
|
||||
end
|
||||
rescue Kubeclient::HttpError => ke
|
||||
app.make_errored!("Kubernetes error: #{ke.message}") unless app.errored?
|
||||
rescue Kubeclient::HttpError
|
||||
app.make_errored!("Kubernetes error") unless app.errored?
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -27,7 +27,7 @@ module Clusters
|
|||
end
|
||||
|
||||
def on_failed
|
||||
app.make_errored!(installation_errors || 'Installation silently failed')
|
||||
app.make_errored!('Installation failed')
|
||||
ensure
|
||||
remove_installation_pod
|
||||
end
|
||||
|
|
|
@ -12,10 +12,10 @@ module Clusters
|
|||
|
||||
ClusterWaitForAppInstallationWorker.perform_in(
|
||||
ClusterWaitForAppInstallationWorker::INTERVAL, app.name, app.id)
|
||||
rescue Kubeclient::HttpError => ke
|
||||
app.make_errored!("Kubernetes error: #{ke.message}")
|
||||
rescue StandardError => e
|
||||
app.make_errored!("Can't start installation process. #{e.message}")
|
||||
rescue Kubeclient::HttpError
|
||||
app.make_errored!("Kubernetes error.")
|
||||
rescue StandardError
|
||||
app.make_errored!("Can't start installation process.")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -82,7 +82,7 @@ describe Clusters::Applications::CheckInstallationProgressService do
|
|||
service.execute
|
||||
|
||||
expect(application).to be_errored
|
||||
expect(application.status_reason).to eq(errors)
|
||||
expect(application.status_reason).to eq("Installation failed")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ describe Clusters::Applications::InstallService do
|
|||
service.execute
|
||||
|
||||
expect(application).to be_errored
|
||||
expect(application.status_reason).to match(/kubernetes error:/i)
|
||||
expect(application.status_reason).to match('Kubernetes error.')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue