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
eacb7223
Commit
eacb7223
authored
Aug 05, 2020
by
Igor Drozdov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'id-remove-lfs-check-ff' into 'master'"
This reverts merge request !38677
parent
15b0ac26
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
lib/gitlab/checks/lfs_check.rb
lib/gitlab/checks/lfs_check.rb
+4
-0
spec/lib/gitlab/checks/lfs_check_spec.rb
spec/lib/gitlab/checks/lfs_check_spec.rb
+12
-0
No files found.
lib/gitlab/checks/lfs_check.rb
View file @
eacb7223
...
...
@@ -7,6 +7,10 @@ module Gitlab
ERROR_MESSAGE
=
'LFS objects are missing. Ensure LFS is properly set up or try a manual "git lfs push --all".'
def
validate!
# This feature flag is used for disabling integrify check on some envs
# because these costy calculations may cause performance issues
return
unless
Feature
.
enabled?
(
:lfs_check
,
default_enabled:
true
)
return
unless
project
.
lfs_enabled?
return
if
skip_lfs_integrity_check
...
...
spec/lib/gitlab/checks/lfs_check_spec.rb
View file @
eacb7223
...
...
@@ -27,6 +27,18 @@ RSpec.describe Gitlab::Checks::LfsCheck do
allow
(
project
).
to
receive
(
:lfs_enabled?
).
and_return
(
true
)
end
context
'with lfs_check feature disabled'
do
before
do
stub_feature_flags
(
lfs_check:
false
)
end
it
'skips integrity check'
do
expect_any_instance_of
(
Gitlab
::
Git
::
LfsChanges
).
not_to
receive
(
:new_pointers
)
subject
.
validate!
end
end
context
'deletion'
do
let
(
:changes
)
{
{
oldrev:
oldrev
,
ref:
ref
}
}
...
...
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