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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
3d5fa07f
Commit
3d5fa07f
authored
May 22, 2020
by
Nick Nguyen
Committed by
Douglas Barbosa Alexandre
May 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Geo: Design thumbnails are not replicated"
parent
9b9570f7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
2 deletions
+21
-2
changelogs/unreleased/218557-geo-design-thumbnails-are-not-replicated.yml
...eased/218557-geo-design-thumbnails-are-not-replicated.yml
+5
-0
ee/lib/gitlab/geo/replication.rb
ee/lib/gitlab/geo/replication.rb
+1
-1
ee/lib/gitlab/geo/replication/base_transfer.rb
ee/lib/gitlab/geo/replication/base_transfer.rb
+1
-1
ee/spec/lib/gitlab/geo/replication/base_transfer_spec.rb
ee/spec/lib/gitlab/geo/replication/base_transfer_spec.rb
+14
-0
No files found.
changelogs/unreleased/218557-geo-design-thumbnails-are-not-replicated.yml
0 → 100644
View file @
3d5fa07f
---
title
:
Fix Geo replication for design thumbnails
merge_request
:
32703
author
:
type
:
fixed
ee/lib/gitlab/geo/replication.rb
View file @
3d5fa07f
...
...
@@ -3,7 +3,7 @@
module
Gitlab
module
Geo
module
Replication
USER_UPLOADS_OBJECT_TYPES
=
%i[attachment avatar file import_export namespace_file personal_file favicon]
.
freeze
USER_UPLOADS_OBJECT_TYPES
=
%i[attachment avatar file import_export namespace_file personal_file favicon
design_management/design_v432x230
]
.
freeze
FILE_NOT_FOUND_GEO_CODE
=
'FILE_NOT_FOUND'
.
freeze
def
self
.
object_type_from_user_uploads?
(
object_type
)
...
...
ee/lib/gitlab/geo/replication/base_transfer.rb
View file @
3d5fa07f
...
...
@@ -46,7 +46,7 @@ module Gitlab
# @return [String] URL to download the resource from
def
resource_url
Gitlab
::
Geo
.
primary_node
.
geo_transfers_url
(
file_type
,
file_id
.
to_s
)
Gitlab
::
Geo
.
primary_node
.
geo_transfers_url
(
url_encode
(
file_type
)
,
file_id
.
to_s
)
end
# Returns Result object with success boolean and number of bytes downloaded.
...
...
ee/spec/lib/gitlab/geo/replication/base_transfer_spec.rb
View file @
3d5fa07f
...
...
@@ -8,6 +8,20 @@ describe Gitlab::Geo::Replication::BaseTransfer do
let_it_be
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary_node
)
{
create
(
:geo_node
)
}
describe
'#resource_url'
do
subject
do
described_class
.
new
(
file_type:
'design_management/design_v432x230'
,
file_id:
1
,
filename:
Tempfile
.
new
,
expected_checksum:
nil
,
request_data:
nil
)
end
context
'when file type contains /'
do
it
'returns escaped url'
do
url
=
subject
.
resource_url
expect
(
url
).
to
include
(
'design_management%2Fdesign_v432x230'
)
end
end
end
describe
'#can_transfer?'
do
subject
do
described_class
.
new
(
file_type: :avatar
,
file_id:
1
,
filename:
Tempfile
.
new
,
...
...
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