diff options
Diffstat (limited to 'app/services/clusters')
-rw-r--r-- | app/services/clusters/aws/authorize_role_service.rb | 4 | ||||
-rw-r--r-- | app/services/clusters/parse_cluster_applications_artifact_service.rb | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/app/services/clusters/aws/authorize_role_service.rb b/app/services/clusters/aws/authorize_role_service.rb index 6eafce0597e..fb620f77b9f 100644 --- a/app/services/clusters/aws/authorize_role_service.rb +++ b/app/services/clusters/aws/authorize_role_service.rb @@ -23,7 +23,9 @@ module Clusters @role = create_or_update_role! Response.new(:ok, credentials) - rescue *ERRORS + rescue *ERRORS => e + Gitlab::ErrorTracking.track_exception(e) + Response.new(:unprocessable_entity, {}) end diff --git a/app/services/clusters/parse_cluster_applications_artifact_service.rb b/app/services/clusters/parse_cluster_applications_artifact_service.rb index 6a0ca0ef9d0..b9b2953b6bd 100644 --- a/app/services/clusters/parse_cluster_applications_artifact_service.rb +++ b/app/services/clusters/parse_cluster_applications_artifact_service.rb @@ -5,7 +5,7 @@ module Clusters include Gitlab::Utils::StrongMemoize MAX_ACCEPTABLE_ARTIFACT_SIZE = 5.kilobytes - RELEASE_NAMES = %w[prometheus cilium].freeze + RELEASE_NAMES = %w[cilium].freeze def initialize(job, current_user) @job = job @@ -14,8 +14,6 @@ module Clusters end def execute(artifact) - return success unless Feature.enabled?(:cluster_applications_artifact, project) - raise ArgumentError, 'Artifact is not cluster_applications file type' unless artifact&.cluster_applications? return error(too_big_error_message, :bad_request) unless artifact.file.size < MAX_ACCEPTABLE_ARTIFACT_SIZE @@ -46,6 +44,8 @@ module Clusters releases = [] artifact.each_blob do |blob| + next if blob.empty? + releases.concat(Gitlab::Kubernetes::Helm::Parsers::ListV2.new(blob).releases) end |