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
Léo-Paul Géneau
gitlab-ce
Commits
fa2e3162
Commit
fa2e3162
authored
Jul 11, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added changelog, small refactor
parent
3c31de75
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
changelogs/unreleased/48745-project-exports-fail-when-uploads-have-been-migrated-to-object-storage.yml
...ail-when-uploads-have-been-migrated-to-object-storage.yml
+5
-0
lib/gitlab/import_export/uploads_manager.rb
lib/gitlab/import_export/uploads_manager.rb
+1
-2
spec/lib/gitlab/import_export/avatar_saver_spec.rb
spec/lib/gitlab/import_export/avatar_saver_spec.rb
+0
-2
spec/lib/gitlab/import_export/uploads_manager_spec.rb
spec/lib/gitlab/import_export/uploads_manager_spec.rb
+0
-2
No files found.
changelogs/unreleased/48745-project-exports-fail-when-uploads-have-been-migrated-to-object-storage.yml
0 → 100644
View file @
fa2e3162
---
title
:
Add uploader support to Import/Export uploads
merge_request
:
20484
author
:
type
:
added
lib/gitlab/import_export/uploads_manager.rb
View file @
fa2e3162
...
@@ -47,11 +47,10 @@ module Gitlab
...
@@ -47,11 +47,10 @@ module Gitlab
def
copy_from_object_storage
def
copy_from_object_storage
return
unless
Gitlab
::
ImportExport
.
object_storage?
return
unless
Gitlab
::
ImportExport
.
object_storage?
return
if
uploads
.
empty?
uploads
.
each
do
|
upload_model
|
uploads
.
each
do
|
upload_model
|
next
unless
upload_model
.
file
next
unless
upload_model
.
file
next
if
upload_model
.
upload
.
local?
# Already copied
next
if
upload_model
.
upload
.
local?
# Already copied
, using the old method
download_and_copy
(
upload_model
)
download_and_copy
(
upload_model
)
end
end
...
...
spec/lib/gitlab/import_export/avatar_saver_spec.rb
View file @
fa2e3162
...
@@ -19,8 +19,6 @@ describe Gitlab::ImportExport::AvatarSaver do
...
@@ -19,8 +19,6 @@ describe Gitlab::ImportExport::AvatarSaver do
it
'saves a project avatar'
do
it
'saves a project avatar'
do
described_class
.
new
(
project:
project_with_avatar
,
shared:
shared
).
save
described_class
.
new
(
project:
project_with_avatar
,
shared:
shared
).
save
puts
"
#{
shared
.
export_path
}
/avatar/dk.png"
expect
(
File
).
to
exist
(
"
#{
shared
.
export_path
}
/avatar/dk.png"
)
expect
(
File
).
to
exist
(
"
#{
shared
.
export_path
}
/avatar/dk.png"
)
end
end
...
...
spec/lib/gitlab/import_export/uploads_manager_spec.rb
View file @
fa2e3162
...
@@ -34,8 +34,6 @@ describe Gitlab::ImportExport::UploadsManager do
...
@@ -34,8 +34,6 @@ describe Gitlab::ImportExport::UploadsManager do
it
'copies the file in the correct location when there is an upload'
do
it
'copies the file in the correct location when there is an upload'
do
manager
.
save
manager
.
save
puts
exported_file_path
expect
(
File
).
to
exist
(
exported_file_path
)
expect
(
File
).
to
exist
(
exported_file_path
)
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