diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /app/uploaders | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/bulk_imports/export_uploader.rb | 7 | ||||
-rw-r--r-- | app/uploaders/file_mover.rb | 2 | ||||
-rw-r--r-- | app/uploaders/object_storage.rb | 7 |
3 files changed, 11 insertions, 5 deletions
diff --git a/app/uploaders/bulk_imports/export_uploader.rb b/app/uploaders/bulk_imports/export_uploader.rb new file mode 100644 index 00000000000..356e5ce028e --- /dev/null +++ b/app/uploaders/bulk_imports/export_uploader.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +module BulkImports + class ExportUploader < ImportExportUploader + EXTENSION_WHITELIST = %w[ndjson.gz].freeze + end +end diff --git a/app/uploaders/file_mover.rb b/app/uploaders/file_mover.rb index 887cb702acf..95bc2680ed6 100644 --- a/app/uploaders/file_mover.rb +++ b/app/uploaders/file_mover.rb @@ -54,7 +54,7 @@ class FileMover updated_text = to_model.read_attribute(update_field) .gsub(temp_file_uploader.markdown_link, uploader.markdown_link) to_model.update_attribute(update_field, updated_text) - rescue + rescue StandardError revert false end diff --git a/app/uploaders/object_storage.rb b/app/uploaders/object_storage.rb index ea71930062c..be5839b7ec5 100644 --- a/app/uploaders/object_storage.rb +++ b/app/uploaders/object_storage.rb @@ -187,7 +187,6 @@ module ObjectStorage hash[:TempPath] = workhorse_local_upload_path end - hash[:FeatureFlagExtractBase] = Feature.enabled?(:workhorse_extract_filename_base, default_enabled: :yaml) hash[:MaximumSize] = maximum_size if maximum_size.present? end end @@ -452,7 +451,7 @@ module ObjectStorage def with_exclusive_lease lease_key = exclusive_lease_key uuid = Gitlab::ExclusiveLease.new(lease_key, timeout: 1.hour.to_i).try_obtain - raise ExclusiveLeaseTaken.new(lease_key) unless uuid + raise ExclusiveLeaseTaken, lease_key unless uuid yield uuid ensure @@ -484,7 +483,7 @@ module ObjectStorage end file - rescue => e + rescue StandardError => e # in case of failure delete new file new_file.delete unless new_file.nil? # revert back to the old file @@ -509,4 +508,4 @@ module ObjectStorage end end -ObjectStorage::Concern.include_if_ee('::EE::ObjectStorage::Concern') +ObjectStorage::Concern.include_mod_with('ObjectStorage::Concern') |