Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab FOSS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab FOSS
Merge requests
!29556
Feature flag default on catfile cache
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feature flag default on catfile cache
zj-gitlab/gitlab-ce:zj-feature-flag-default-on-catfile-cache
into
master
Overview
17
Commits
2
Pipelines
8
Changes
7
All threads resolved!
Show all comments
Merged
Zeger-Jan van de Weg
requested to merge
zj-gitlab/gitlab-ce:zj-feature-flag-default-on-catfile-cache
into
master
5 years ago
Overview
17
Commits
2
Pipelines
8
Changes
7
All threads resolved!
Show all comments
Expand
What does this MR do?
Set the feature flag to default to on for the catfile cache.
Conformity
Changelog entry
Documentation created/updated
or
follow-up review issue created
Code review guidelines
Merge request performance guidelines
Style guides
Database guides
Separation of EE specific content
Edited
5 years ago
by
Zeger-Jan van de Weg
0
0
Merge request reports
Compare
master
version 7
cdba0dea
5 years ago
version 6
c315f34c
5 years ago
version 5
8e02cad2
5 years ago
version 4
d7918f40
5 years ago
version 3
459ed639
5 years ago
version 2
421f2e3e
5 years ago
version 1
48de93da
5 years ago
master (base)
and
version 7
latest version
4dfaaf40
2 commits,
5 years ago
version 7
cdba0dea
2 commits,
5 years ago
version 6
c315f34c
2 commits,
5 years ago
version 5
8e02cad2
2 commits,
5 years ago
version 4
d7918f40
2 commits,
5 years ago
version 3
459ed639
2 commits,
5 years ago
version 2
421f2e3e
2 commits,
5 years ago
version 1
48de93da
2 commits,
5 years ago
7 files
+
84
−
39
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
lib/feature/gitaly.rb
0 → 100644
+
31
−
0
Options
# frozen_string_literal: true
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
].
freeze
DEFAULT_ON_FLAGS
=
Set
.
new
([
CATFILE_CACHE
]).
freeze
class
<<
self
def
enabled?
(
feature_flag
)
return
false
unless
Feature
::
FlipperFeature
.
table_exists?
default_on
=
DEFAULT_ON_FLAGS
.
include?
(
feature_flag
)
Feature
.
enabled?
(
"gitaly_
#{
feature_flag
}
"
,
default_enabled:
default_on
)
rescue
ActiveRecord
::
NoDatabaseError
false
end
def
server_feature_flags
SERVER_FEATURE_FLAGS
.
map
do
|
f
|
[
"gitaly-feature-
#{
f
.
tr
(
'_'
,
'-'
)
}
"
,
enabled?
(
f
).
to_s
]
end
.
to_h
end
end
end
end
Loading