From 9f46488805e86b1bc341ea1620b866016c2ce5ed Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 20 May 2020 14:34:42 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-0-stable-ee --- lib/gitlab/workhorse.rb | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'lib/gitlab/workhorse.rb') diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index b375602a5fe..c91d1b05440 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -62,9 +62,6 @@ module Gitlab end def send_git_archive(repository, ref:, format:, append_sha:, path: nil) - path_enabled = Feature.enabled?(:git_archive_path, default_enabled: true) - path = nil unless path_enabled - format ||= 'tar.gz' format = format.downcase @@ -78,12 +75,7 @@ module Gitlab raise "Repository or ref not found" if metadata.empty? - params = - if path_enabled - send_git_archive_params(repository, metadata, path, archive_format(format)) - else - metadata - end + params = send_git_archive_params(repository, metadata, path, archive_format(format)) # If present, DisableCache must be a Boolean. Otherwise # workhorse ignores it. @@ -138,8 +130,7 @@ module Gitlab ] end - def send_artifacts_entry(build, entry) - file = build.artifacts_file + def send_artifacts_entry(file, entry) archive = file.file_storage? ? file.path : file.url params = { @@ -213,7 +204,7 @@ module Gitlab # This is the outermost encoding of a senddata: header. It is safe for # inclusion in HTTP response headers def encode(hash) - Base64.urlsafe_encode64(JSON.dump(hash)) + Base64.urlsafe_encode64(Gitlab::Json.dump(hash)) end # This is for encoding individual fields inside the senddata JSON that -- cgit v1.2.1