Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
786457ca
Commit
786457ca
authored
Dec 16, 2016
by
James Lopez
Committed by
Rémy Coutable
Dec 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for missing service when importing from EE to CE
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
ffcd20ce
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
1 deletion
+34
-1
changelogs/unreleased/fix-import-export-ee-services.yml
changelogs/unreleased/fix-import-export-ee-services.yml
+4
-0
lib/gitlab/import_export/project_tree_restorer.rb
lib/gitlab/import_export/project_tree_restorer.rb
+1
-1
lib/gitlab/import_export/relation_factory.rb
lib/gitlab/import_export/relation_factory.rb
+7
-0
spec/lib/gitlab/import_export/project.json
spec/lib/gitlab/import_export/project.json
+22
-0
No files found.
changelogs/unreleased/fix-import-export-ee-services.yml
0 → 100644
View file @
786457ca
---
title
:
Fix missing service error importing from EE to CE
merge_request
:
8144
author
:
lib/gitlab/import_export/project_tree_restorer.rb
View file @
786457ca
...
...
@@ -120,7 +120,7 @@ module Gitlab
members_mapper:
members_mapper
,
user:
@user
,
project_id:
restored_project
.
id
)
end
end
.
compact
relation_hash_list
.
is_a?
(
Array
)
?
relation_array
:
relation_array
.
first
end
...
...
lib/gitlab/import_export/relation_factory.rb
View file @
786457ca
...
...
@@ -40,6 +40,8 @@ module Gitlab
# the relation_hash, updating references with new object IDs, mapping users using
# the "members_mapper" object, also updating notes if required.
def
create
return
nil
if
unknown_service?
setup_models
generate_imported_object
...
...
@@ -217,6 +219,11 @@ module Gitlab
existing_object
end
end
def
unknown_service?
@relation_name
==
:services
&&
parsed_relation_hash
[
'type'
]
&&
!
Object
.
const_defined?
(
parsed_relation_hash
[
'type'
])
end
end
end
end
spec/lib/gitlab/import_export/project.json
View file @
786457ca
...
...
@@ -7411,6 +7411,28 @@
"category"
:
"common"
,
"default"
:
false
,
"wiki_page_events"
:
true
},
{
"id"
:
101
,
"title"
:
"JenkinsDeprecated"
,
"project_id"
:
5
,
"created_at"
:
"2016-06-14T15:01:51.031Z"
,
"updated_at"
:
"2016-06-14T15:01:51.031Z"
,
"active"
:
false
,
"properties"
:
{
},
"template"
:
false
,
"push_events"
:
true
,
"issues_events"
:
true
,
"merge_requests_events"
:
true
,
"tag_push_events"
:
true
,
"note_events"
:
true
,
"build_events"
:
true
,
"category"
:
"common"
,
"default"
:
false
,
"wiki_page_events"
:
true
,
"type"
:
"JenkinsDeprecatedService"
}
],
"hooks"
:
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment