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
Boxiang Sun
gitlab-ce
Commits
e61f66b3
Commit
e61f66b3
authored
Jun 26, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When moving issues, don't attempt to move files in object storage
Closes #48505
parent
cd578941
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
changelogs/unreleased/sh-fix-move-issue-with-object-storage.yml
...logs/unreleased/sh-fix-move-issue-with-object-storage.yml
+5
-0
lib/gitlab/gfm/uploads_rewriter.rb
lib/gitlab/gfm/uploads_rewriter.rb
+1
-1
spec/lib/gitlab/gfm/uploads_rewriter_spec.rb
spec/lib/gitlab/gfm/uploads_rewriter_spec.rb
+19
-0
No files found.
changelogs/unreleased/sh-fix-move-issue-with-object-storage.yml
0 → 100644
View file @
e61f66b3
---
title
:
When moving issues, don't attempt to move files in object storage
merge_request
:
author
:
type
:
fixed
lib/gitlab/gfm/uploads_rewriter.rb
View file @
e61f66b3
...
@@ -48,7 +48,7 @@ module Gitlab
...
@@ -48,7 +48,7 @@ module Gitlab
def
find_file
(
project
,
secret
,
file
)
def
find_file
(
project
,
secret
,
file
)
uploader
=
FileUploader
.
new
(
project
,
secret:
secret
)
uploader
=
FileUploader
.
new
(
project
,
secret:
secret
)
uploader
.
retrieve_from_store!
(
file
)
uploader
.
retrieve_from_store!
(
file
)
uploader
.
file
uploader
.
file
if
uploader
.
object_store
==
ObjectStorage
::
Store
::
LOCAL
end
end
# Because the uploaders use 'move_to_store' we must have a temporary
# Because the uploaders use 'move_to_store' we must have a temporary
...
...
spec/lib/gitlab/gfm/uploads_rewriter_spec.rb
View file @
e61f66b3
...
@@ -62,5 +62,24 @@ describe Gitlab::Gfm::UploadsRewriter do
...
@@ -62,5 +62,24 @@ describe Gitlab::Gfm::UploadsRewriter do
subject
{
rewriter
.
files
}
subject
{
rewriter
.
files
}
it
{
is_expected
.
to
be_an
(
Array
)
}
it
{
is_expected
.
to
be_an
(
Array
)
}
end
end
describe
'with object storage'
do
before
do
stub_uploads_object_storage
(
uploader:
FileUploader
)
zip_uploader
.
migrate!
(
FileUploader
::
Store
::
REMOTE
)
end
describe
'#needs_rewrite?'
do
subject
{
rewriter
.
needs_rewrite?
}
it
{
is_expected
.
to
eq
false
}
end
describe
'#files'
do
subject
{
rewriter
.
files
}
it
{
is_expected
.
to
eq
([])
}
end
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