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
187f45fb
Commit
187f45fb
authored
Jun 17, 2020
by
Christian Couder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove partial clone feature flag
Part of:
https://gitlab.com/gitlab-org/gitaly/-/issues/2874
parent
f2a49133
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
31 deletions
+8
-31
changelogs/unreleased/remove-partial-clone-feature-flag.yml
changelogs/unreleased/remove-partial-clone-feature-flag.yml
+6
-0
lib/api/internal/base.rb
lib/api/internal/base.rb
+2
-4
spec/requests/api/internal/base_spec.rb
spec/requests/api/internal/base_spec.rb
+0
-27
No files found.
changelogs/unreleased/remove-partial-clone-feature-flag.yml
0 → 100644
View file @
187f45fb
---
title
:
Remove partial clone feature flag
merge_request
:
34703
author
:
type
:
added
lib/api/internal/base.rb
View file @
187f45fb
...
...
@@ -63,15 +63,13 @@ module API
gl_project_path:
gl_repository_path
,
gl_id:
Gitlab
::
GlId
.
gl_id
(
actor
.
user
),
gl_username:
actor
.
username
,
git_config_options:
[],
git_config_options:
[
"uploadpack.allowFilter=true"
,
"uploadpack.allowAnySHA1InWant=true"
],
gitaly:
gitaly_payload
(
params
[
:action
]),
gl_console_messages:
check_result
.
console_messages
}
# Custom option for git-receive-pack command
if
Feature
.
enabled?
(
:gitaly_upload_pack_filter
,
project
,
default_enabled:
true
)
payload
[
:git_config_options
]
<<
"uploadpack.allowFilter=true"
<<
"uploadpack.allowAnySHA1InWant=true"
end
receive_max_input_size
=
Gitlab
::
CurrentSettings
.
receive_max_input_size
.
to_i
...
...
spec/requests/api/internal/base_spec.rb
View file @
187f45fb
...
...
@@ -467,21 +467,6 @@ describe API::Internal::Base do
expect
(
json_response
[
"git_config_options"
]).
to
include
(
"uploadpack.allowFilter=true"
)
expect
(
json_response
[
"git_config_options"
]).
to
include
(
"uploadpack.allowAnySHA1InWant=true"
)
end
context
'when gitaly_upload_pack_filter feature flag is disabled'
do
before
do
stub_feature_flags
(
gitaly_upload_pack_filter:
false
)
end
it
'returns only maxInputSize and not partial clone git config'
do
push
(
key
,
project
)
expect
(
json_response
[
"git_config_options"
]).
to
be_present
expect
(
json_response
[
"git_config_options"
]).
to
include
(
"receive.maxInputSize=1048576"
)
expect
(
json_response
[
"git_config_options"
]).
not_to
include
(
"uploadpack.allowFilter=true"
)
expect
(
json_response
[
"git_config_options"
]).
not_to
include
(
"uploadpack.allowAnySHA1InWant=true"
)
end
end
end
context
'when receive_max_input_size is empty'
do
...
...
@@ -496,18 +481,6 @@ describe API::Internal::Base do
expect
(
json_response
[
"git_config_options"
]).
to
include
(
"uploadpack.allowFilter=true"
)
expect
(
json_response
[
"git_config_options"
]).
to
include
(
"uploadpack.allowAnySHA1InWant=true"
)
end
context
'when gitaly_upload_pack_filter feature flag is disabled'
do
before
do
stub_feature_flags
(
gitaly_upload_pack_filter:
false
)
end
it
'returns an empty git config'
do
push
(
key
,
project
)
expect
(
json_response
[
"git_config_options"
]).
to
be_empty
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