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:
Diffstat (limited to 'lib/gitlab/import_export')
-rw-r--r--lib/gitlab/import_export/file_importer.rb2
-rw-r--r--lib/gitlab/import_export/group/import_export.yml4
-rw-r--r--lib/gitlab/import_export/group/relation_factory.rb4
-rw-r--r--lib/gitlab/import_export/group/relation_tree_restorer.rb2
-rw-r--r--lib/gitlab/import_export/project/import_export.yml6
-rw-r--r--lib/gitlab/import_export/project/tree_restorer.rb2
-rw-r--r--lib/gitlab/import_export/project/tree_saver.rb2
7 files changed, 18 insertions, 4 deletions
diff --git a/lib/gitlab/import_export/file_importer.rb b/lib/gitlab/import_export/file_importer.rb
index 829b3771518..1878b5b1a30 100644
--- a/lib/gitlab/import_export/file_importer.rb
+++ b/lib/gitlab/import_export/file_importer.rb
@@ -28,7 +28,7 @@ module Gitlab
copy_archive
wait_for_archived_file do
- validate_decompressed_archive_size if Feature.enabled?(:validate_import_decompressed_archive_size, default_enabled: :yaml)
+ validate_decompressed_archive_size if Feature.enabled?(:validate_import_decompressed_archive_size)
decompress_archive
end
rescue StandardError => e
diff --git a/lib/gitlab/import_export/group/import_export.yml b/lib/gitlab/import_export/group/import_export.yml
index f7ab1677001..8df5d52bf77 100644
--- a/lib/gitlab/import_export/group/import_export.yml
+++ b/lib/gitlab/import_export/group/import_export.yml
@@ -16,6 +16,7 @@ tree:
- :board
- members:
- :user
+ - :namespace_settings
included_attributes:
user:
@@ -24,6 +25,8 @@ included_attributes:
- :username
author:
- :name
+ namespace_settings:
+ - :prevent_sharing_groups_outside_hierarchy
excluded_attributes:
group:
@@ -38,6 +41,7 @@ excluded_attributes:
- :shared_runners_minute_limit
- :extra_shared_runners_minutes_limit
- :repository_size_limit
+ - :max_pages_size
epics:
- :state_id
diff --git a/lib/gitlab/import_export/group/relation_factory.rb b/lib/gitlab/import_export/group/relation_factory.rb
index adbbd37ce10..258078d595b 100644
--- a/lib/gitlab/import_export/group/relation_factory.rb
+++ b/lib/gitlab/import_export/group/relation_factory.rb
@@ -30,6 +30,10 @@ module Gitlab
update_group_references
end
+ def invalid_relation?
+ @relation_name == :namespace_settings
+ end
+
def update_group_references
return unless self.class.existing_object_relations.include?(@relation_name)
return unless @relation_hash['group_id']
diff --git a/lib/gitlab/import_export/group/relation_tree_restorer.rb b/lib/gitlab/import_export/group/relation_tree_restorer.rb
index b44874f598c..4b28dd831fc 100644
--- a/lib/gitlab/import_export/group/relation_tree_restorer.rb
+++ b/lib/gitlab/import_export/group/relation_tree_restorer.rb
@@ -89,7 +89,7 @@ module Gitlab
end
def save_relation_object(relation_object, relation_key, relation_definition, relation_index)
- if Feature.enabled?(:import_relation_object_persistence, default_enabled: :yaml) && relation_object.new_record?
+ if Feature.enabled?(:import_relation_object_persistence) && relation_object.new_record?
Gitlab::ImportExport::Base::RelationObjectSaver.new(
relation_object: relation_object,
relation_key: relation_key,
diff --git a/lib/gitlab/import_export/project/import_export.yml b/lib/gitlab/import_export/project/import_export.yml
index 7dcf26ca89a..1625c39595c 100644
--- a/lib/gitlab/import_export/project/import_export.yml
+++ b/lib/gitlab/import_export/project/import_export.yml
@@ -48,6 +48,8 @@ tree:
- :award_emoji
- releases:
- :links
+ - milestone_releases:
+ - :milestone
- project_members:
- :user
- merge_requests:
@@ -752,6 +754,7 @@ excluded_attributes:
- :compliance_framework_setting
- :show_default_award_emojis
- :warn_about_potentially_unwanted_characters
+ - :enforce_auth_checks_on_uploads
- :services
- :exported_protected_branches
- :repository_size_limit
@@ -957,6 +960,9 @@ excluded_attributes:
system_note_metadata:
- :description_version_id
- :note_id
+ milestone_releases:
+ - :milestone_id
+ - :release_id
methods:
notes:
- :type
diff --git a/lib/gitlab/import_export/project/tree_restorer.rb b/lib/gitlab/import_export/project/tree_restorer.rb
index d8992061524..47f82a901b7 100644
--- a/lib/gitlab/import_export/project/tree_restorer.rb
+++ b/lib/gitlab/import_export/project/tree_restorer.rb
@@ -54,7 +54,7 @@ module Gitlab
end
def ndjson_relation_reader
- return unless Feature.enabled?(:project_import_ndjson, project.namespace, default_enabled: true)
+ return unless Feature.enabled?(:project_import_ndjson, project.namespace)
ImportExport::Json::NdjsonReader.new(
File.join(shared.export_path, 'tree')
diff --git a/lib/gitlab/import_export/project/tree_saver.rb b/lib/gitlab/import_export/project/tree_saver.rb
index 63c5afa9595..05dcfa5282c 100644
--- a/lib/gitlab/import_export/project/tree_saver.rb
+++ b/lib/gitlab/import_export/project/tree_saver.rb
@@ -80,7 +80,7 @@ module Gitlab
def json_writer
@json_writer ||= begin
- if ::Feature.enabled?(:project_export_as_ndjson, @project.namespace, default_enabled: true)
+ if ::Feature.enabled?(:project_export_as_ndjson, @project.namespace)
full_path = File.join(@shared.export_path, 'tree')
Gitlab::ImportExport::Json::NdjsonWriter.new(full_path)
else