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>2020-08-20 21:42:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 21:42:06 +0300
commit6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch)
tree78be5963ec075d80116a932011d695dd33910b4e /app/services/clusters
parent1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff)
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app/services/clusters')
-rw-r--r--app/services/clusters/aws/authorize_role_service.rb4
-rw-r--r--app/services/clusters/parse_cluster_applications_artifact_service.rb6
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