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
d6edecde
Commit
d6edecde
authored
Dec 19, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix duplicated build token problem and added relevant spec
parent
2c49c1af
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
1 deletion
+17
-1
changelogs/unreleased/fix-import-export-build-token.yml
changelogs/unreleased/fix-import-export-build-token.yml
+4
-0
lib/gitlab/import_export/relation_factory.rb
lib/gitlab/import_export/relation_factory.rb
+2
-0
spec/lib/gitlab/import_export/project.json
spec/lib/gitlab/import_export/project.json
+3
-1
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
+8
-0
No files found.
changelogs/unreleased/fix-import-export-build-token.yml
0 → 100644
View file @
d6edecde
---
title
:
Fix Import/Export duplicated builds error
merge_request
:
author
:
lib/gitlab/import_export/relation_factory.rb
View file @
d6edecde
...
...
@@ -99,6 +99,8 @@ module Gitlab
def
generate_imported_object
if
BUILD_MODELS
.
include?
(
@relation_name
)
# call #trace= method after assigning the other attributes
trace
=
@relation_hash
.
delete
(
'trace'
)
@relation_hash
.
delete
(
'token'
)
imported_object
do
|
object
|
object
.
trace
=
trace
object
.
commit_id
=
nil
...
...
spec/lib/gitlab/import_export/project.json
View file @
d6edecde
...
...
@@ -6548,7 +6548,9 @@
"url"
:
null
},
"erased_by_id"
:
null
,
"erased_at"
:
null
"erased_at"
:
null
,
"type"
:
"Ci::Build"
,
"token"
:
"abcd"
},
{
"id"
:
72
,
...
...
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
View file @
d6edecde
...
...
@@ -189,6 +189,14 @@ describe Gitlab::ImportExport::ProjectTreeRestorer, services: true do
end
end
end
context
'existing builds'
do
it
'do not throw errors'
do
create
(
:ci_build
,
token:
'abcd'
)
expect
(
restored_project_json
).
to
be
true
end
end
end
end
end
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