diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /lib/gitlab/import_export/command_line_util.rb | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'lib/gitlab/import_export/command_line_util.rb')
-rw-r--r-- | lib/gitlab/import_export/command_line_util.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/gitlab/import_export/command_line_util.rb b/lib/gitlab/import_export/command_line_util.rb index 924ca4e83ea..dfe0815f0a0 100644 --- a/lib/gitlab/import_export/command_line_util.rb +++ b/lib/gitlab/import_export/command_line_util.rb @@ -37,7 +37,7 @@ module Gitlab def gzip_with_options(dir:, filename:, options: nil) filepath = File.join(dir, filename) - cmd = %W(gzip #{filepath}) + cmd = %W[gzip #{filepath}] cmd << "-#{options}" if options _, status = Gitlab::Popen.popen(cmd) @@ -68,6 +68,8 @@ module Gitlab File.open(upload_path, 'wb') do |file| current_size = 0 + # When migrating from Gitlab::HTTP to Gitlab:HTTP_V2, we need to pass `extra_allowed_uris` as an option + # instead of `allow_object_storage`. Gitlab::HTTP.get(url, stream_body: true, allow_object_storage: true) do |fragment| if [301, 302, 303, 307].include?(fragment.code) Gitlab::Import::Logger.warn(message: "received redirect fragment", fragment_code: fragment.code) @@ -87,12 +89,12 @@ module Gitlab end def tar_with_options(archive:, dir:, options:) - execute_cmd(%W(tar -#{options} #{archive} -C #{dir} .)) + execute_cmd(%W[tar -#{options} #{archive} -C #{dir} .]) end def untar_with_options(archive:, dir:, options:) - execute_cmd(%W(tar -#{options} #{archive} -C #{dir})) - execute_cmd(%W(chmod -R #{UNTAR_MASK} #{dir})) + execute_cmd(%W[tar -#{options} #{archive} -C #{dir}]) + execute_cmd(%W[chmod -R #{UNTAR_MASK} #{dir}]) clean_extraction_dir!(dir) end |