Merge branch 'jc-remove-catfile-flag' into 'master'
Remove catfile cache feature flag See merge request gitlab-org/gitlab-ce!30750
This commit is contained in:
commit
e3c57e1c50
4 changed files with 7 additions and 18 deletions
5
changelogs/unreleased/jc-remove-catfile-flag.yml
Normal file
5
changelogs/unreleased/jc-remove-catfile-flag.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Remove catfile cache feature flag
|
||||
merge_request: 30750
|
||||
author:
|
||||
type: performance
|
|
@ -5,16 +5,12 @@ require 'set'
|
|||
class Feature
|
||||
class Gitaly
|
||||
# Server feature flags should use '_' to separate words.
|
||||
# CATFILE_CACHE sets an incorrect example
|
||||
CATFILE_CACHE = 'catfile-cache'.freeze
|
||||
|
||||
SERVER_FEATURE_FLAGS =
|
||||
[
|
||||
CATFILE_CACHE,
|
||||
'get_commit_signatures'.freeze
|
||||
].freeze
|
||||
|
||||
DEFAULT_ON_FLAGS = Set.new([CATFILE_CACHE]).freeze
|
||||
DEFAULT_ON_FLAGS = Set.new([]).freeze
|
||||
|
||||
class << self
|
||||
def enabled?(feature_flag)
|
||||
|
|
|
@ -211,8 +211,7 @@ module Gitlab
|
|||
metadata['call_site'] = feature.to_s if feature
|
||||
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['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)
|
||||
|
||||
result = { metadata: metadata }
|
||||
|
|
|
@ -171,17 +171,6 @@ describe Gitlab::GitalyClient do
|
|||
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
|
||||
|
||||
describe 'enforce_gitaly_request_limits?' do
|
||||
|
|
Loading…
Reference in a new issue