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
d69e7b44
Commit
d69e7b44
authored
Feb 27, 2018
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't verify the integrity of uploads and LFS objects in object storage
parent
231e3e3b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
0 deletions
+74
-0
ee/lib/ee/gitlab/verify/lfs_objects.rb
ee/lib/ee/gitlab/verify/lfs_objects.rb
+16
-0
ee/lib/ee/gitlab/verify/uploads.rb
ee/lib/ee/gitlab/verify/uploads.rb
+16
-0
ee/spec/lib/ee/gitlab/verify/lfs_objects_spec.rb
ee/spec/lib/ee/gitlab/verify/lfs_objects_spec.rb
+17
-0
ee/spec/lib/ee/gitlab/verify/uploads_spec.rb
ee/spec/lib/ee/gitlab/verify/uploads_spec.rb
+17
-0
lib/gitlab/verify/lfs_objects.rb
lib/gitlab/verify/lfs_objects.rb
+2
-0
lib/gitlab/verify/uploads.rb
lib/gitlab/verify/uploads.rb
+2
-0
spec/factories/lfs_objects.rb
spec/factories/lfs_objects.rb
+4
-0
No files found.
ee/lib/ee/gitlab/verify/lfs_objects.rb
0 → 100644
View file @
d69e7b44
module
EE
module
Gitlab
module
Verify
module
LfsObjects
extend
::
Gitlab
::
Utils
::
Override
private
override
:relation
def
relation
super
.
with_files_stored_locally
end
end
end
end
end
ee/lib/ee/gitlab/verify/uploads.rb
0 → 100644
View file @
d69e7b44
module
EE
module
Gitlab
module
Verify
module
Uploads
extend
::
Gitlab
::
Utils
::
Override
private
override
:relation
def
relation
super
.
with_files_stored_locally
end
end
end
end
end
ee/spec/lib/ee/gitlab/verify/lfs_objects_spec.rb
0 → 100644
View file @
d69e7b44
require
'spec_helper'
describe
Gitlab
::
Verify
::
LfsObjects
do
before
do
stub_lfs_object_storage
end
it
'skips LFS objects in object storage'
do
local_failure
=
create
(
:lfs_object
)
create
(
:lfs_object
,
:object_storage
)
failures
=
{}
described_class
.
new
(
batch_size:
10
).
run_batches
{
|
_
,
failed
|
failures
.
merge!
(
failed
)
}
expect
(
failures
.
keys
).
to
contain_exactly
(
local_failure
)
end
end
ee/spec/lib/ee/gitlab/verify/uploads_spec.rb
0 → 100644
View file @
d69e7b44
require
'spec_helper'
describe
Gitlab
::
Verify
::
Uploads
do
before
do
stub_uploads_object_storage
(
AvatarUploader
)
end
it
'skips uploads in object storage'
do
local_failure
=
create
(
:upload
)
create
(
:upload
,
:object_storage
)
failures
=
{}
described_class
.
new
(
batch_size:
10
).
run_batches
{
|
_
,
failed
|
failures
.
merge!
(
failed
)
}
expect
(
failures
.
keys
).
to
contain_exactly
(
local_failure
)
end
end
lib/gitlab/verify/lfs_objects.rb
View file @
d69e7b44
module
Gitlab
module
Verify
class
LfsObjects
<
BatchVerifier
prepend
::
EE
::
Gitlab
::
Verify
::
LfsObjects
def
name
'LFS objects'
end
...
...
lib/gitlab/verify/uploads.rb
View file @
d69e7b44
module
Gitlab
module
Verify
class
Uploads
<
BatchVerifier
prepend
::
EE
::
Gitlab
::
Verify
::
Uploads
def
name
'Uploads'
end
...
...
spec/factories/lfs_objects.rb
View file @
d69e7b44
...
...
@@ -15,4 +15,8 @@ FactoryBot.define do
trait
:correct_oid
do
oid
'b804383982bb89b00e828e3f44c038cc991d3d1768009fc39ba8e2c081b9fb75'
end
trait
:object_storage
do
file_store
{
LfsObjectUploader
::
Store
::
REMOTE
}
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