summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-03 09:09:31 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-03 09:09:31 +0000
commit04baa85554ff13bdd4d6f4e6bb24119d17608fee (patch)
tree7cb9c0977e09d97da340f48703d79b2dbd3579a0 /lib/gitlab/import_export
parent42f41de46525ce0065f02ee07c1a79f5669526a0 (diff)
downloadgitlab-ce-04baa85554ff13bdd4d6f4e6bb24119d17608fee.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/import_export')
-rw-r--r--lib/gitlab/import_export/attributes_finder.rb2
-rw-r--r--lib/gitlab/import_export/fast_hash_serializer.rb2
-rw-r--r--lib/gitlab/import_export/project/import_export.yml5
-rw-r--r--lib/gitlab/import_export/relation_tree_restorer.rb6
4 files changed, 10 insertions, 5 deletions
diff --git a/lib/gitlab/import_export/attributes_finder.rb b/lib/gitlab/import_export/attributes_finder.rb
index 28d48ce6dfe..bab473741b1 100644
--- a/lib/gitlab/import_export/attributes_finder.rb
+++ b/lib/gitlab/import_export/attributes_finder.rb
@@ -38,7 +38,7 @@ module Gitlab
def resolve_preloads(model_key, model_tree)
model_tree
.map { |submodel_key, submodel_tree| resolve_preload(model_key, submodel_key, submodel_tree) }
- .compact
+ .tap { |entries| entries.compact! }
.to_h
.deep_merge(@preloads[model_key].to_h)
.presence
diff --git a/lib/gitlab/import_export/fast_hash_serializer.rb b/lib/gitlab/import_export/fast_hash_serializer.rb
index c5fb00ed741..e5d52f945b5 100644
--- a/lib/gitlab/import_export/fast_hash_serializer.rb
+++ b/lib/gitlab/import_export/fast_hash_serializer.rb
@@ -100,7 +100,7 @@ module Gitlab
includes
.map(&method(:serialize_include_definition))
- .compact
+ .tap { |entries| entries.compact! }
.to_h
end
diff --git a/lib/gitlab/import_export/project/import_export.yml b/lib/gitlab/import_export/project/import_export.yml
index 56f7ffbe4f8..06d7dd6f897 100644
--- a/lib/gitlab/import_export/project/import_export.yml
+++ b/lib/gitlab/import_export/project/import_export.yml
@@ -17,6 +17,7 @@ tree:
- notes:
- :author
- :award_emoji
+ - :system_note_metadata
- events:
- :push_event_payload
- label_links:
@@ -47,6 +48,7 @@ tree:
- notes:
- :author
- :award_emoji
+ - :system_note_metadata
- events:
- :push_event_payload
- :suggestions
@@ -323,6 +325,9 @@ excluded_attributes:
epic_issue:
- :epic_id
- :issue_id
+ system_note_metadata:
+ - :description_version_id
+ - :note_id
methods:
notes:
- :type
diff --git a/lib/gitlab/import_export/relation_tree_restorer.rb b/lib/gitlab/import_export/relation_tree_restorer.rb
index 7f25222ba41..78ed365cea0 100644
--- a/lib/gitlab/import_export/relation_tree_restorer.rb
+++ b/lib/gitlab/import_export/relation_tree_restorer.rb
@@ -142,9 +142,9 @@ module Gitlab
end
def build_relations(relation_key, relation_definition, data_hashes)
- data_hashes.map do |data_hash|
- build_relation(relation_key, relation_definition, data_hash)
- end.compact
+ data_hashes
+ .map { |data_hash| build_relation(relation_key, relation_definition, data_hash) }
+ .tap { |entries| entries.compact! }
end
def build_relation(relation_key, relation_definition, data_hash)