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
c77d7837
Commit
c77d7837
authored
Jul 09, 2019
by
John Cai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove catfile cache feature flag
parent
96277bb9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
18 deletions
+7
-18
changelogs/unreleased/jc-remove-catfile-flag.yml
changelogs/unreleased/jc-remove-catfile-flag.yml
+5
-0
lib/feature/gitaly.rb
lib/feature/gitaly.rb
+1
-5
lib/gitlab/gitaly_client.rb
lib/gitlab/gitaly_client.rb
+1
-2
spec/lib/gitlab/gitaly_client_spec.rb
spec/lib/gitlab/gitaly_client_spec.rb
+0
-11
No files found.
changelogs/unreleased/jc-remove-catfile-flag.yml
0 → 100644
View file @
c77d7837
---
title
:
Remove catfile cache feature flag
merge_request
:
30750
author
:
type
:
performance
lib/feature/gitaly.rb
View file @
c77d7837
...
@@ -5,16 +5,12 @@ require 'set'
...
@@ -5,16 +5,12 @@ require 'set'
class
Feature
class
Feature
class
Gitaly
class
Gitaly
# Server feature flags should use '_' to separate words.
# Server feature flags should use '_' to separate words.
# CATFILE_CACHE sets an incorrect example
CATFILE_CACHE
=
'catfile-cache'
.
freeze
SERVER_FEATURE_FLAGS
=
SERVER_FEATURE_FLAGS
=
[
[
CATFILE_CACHE
,
'get_commit_signatures'
.
freeze
'get_commit_signatures'
.
freeze
].
freeze
].
freeze
DEFAULT_ON_FLAGS
=
Set
.
new
([
CATFILE_CACHE
]).
freeze
DEFAULT_ON_FLAGS
=
Set
.
new
([]).
freeze
class
<<
self
class
<<
self
def
enabled?
(
feature_flag
)
def
enabled?
(
feature_flag
)
...
...
lib/gitlab/gitaly_client.rb
View file @
c77d7837
...
@@ -211,8 +211,7 @@ module Gitlab
...
@@ -211,8 +211,7 @@ module Gitlab
metadata
[
'call_site'
]
=
feature
.
to_s
if
feature
metadata
[
'call_site'
]
=
feature
.
to_s
if
feature
metadata
[
'gitaly-servers'
]
=
address_metadata
(
remote_storage
)
if
remote_storage
metadata
[
'gitaly-servers'
]
=
address_metadata
(
remote_storage
)
if
remote_storage
metadata
[
'x-gitlab-correlation-id'
]
=
Labkit
::
Correlation
::
CorrelationId
.
current_id
if
Labkit
::
Correlation
::
CorrelationId
.
current_id
metadata
[
'x-gitlab-correlation-id'
]
=
Labkit
::
Correlation
::
CorrelationId
.
current_id
if
Labkit
::
Correlation
::
CorrelationId
.
current_id
metadata
[
'gitaly-session-id'
]
=
session_id
if
Feature
::
Gitaly
.
enabled?
(
Feature
::
Gitaly
::
CATFILE_CACHE
)
metadata
[
'gitaly-session-id'
]
=
session_id
metadata
.
merge!
(
Feature
::
Gitaly
.
server_feature_flags
)
metadata
.
merge!
(
Feature
::
Gitaly
.
server_feature_flags
)
result
=
{
metadata:
metadata
}
result
=
{
metadata:
metadata
}
...
...
spec/lib/gitlab/gitaly_client_spec.rb
View file @
c77d7837
...
@@ -171,17 +171,6 @@ describe Gitlab::GitalyClient do
...
@@ -171,17 +171,6 @@ describe Gitlab::GitalyClient do
end
end
end
end
end
end
context
'when catfile-cache feature is disabled'
do
before
do
stub_feature_flags
({
'gitaly_catfile-cache'
:
false
})
end
it
'does not set the gitaly-session-id in the metadata'
do
results
=
described_class
.
request_kwargs
(
'default'
,
nil
)
expect
(
results
[
:metadata
]).
not_to
include
(
'gitaly-session-id'
)
end
end
end
end
describe
'enforce_gitaly_request_limits?'
do
describe
'enforce_gitaly_request_limits?'
do
...
...
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