diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /lib/feature/shared.rb | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) | |
download | gitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'lib/feature/shared.rb')
-rw-r--r-- | lib/feature/shared.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/feature/shared.rb b/lib/feature/shared.rb index c06f699ef27..9ec56ee6b52 100644 --- a/lib/feature/shared.rb +++ b/lib/feature/shared.rb @@ -9,12 +9,14 @@ class Feature # optional: defines if a on-disk definition is required for this feature flag type # rollout_issue: defines if `bin/feature-flag` asks for rollout issue # default_enabled: defines a default state of a feature flag when created by `bin/feature-flag` + # ee_only: defines that a feature flag can only be created in a context of EE # example: usage being shown when exception is raised TYPES = { development: { description: 'Short lived, used to enable unfinished code to be deployed', - optional: true, + optional: false, rollout_issue: true, + ee_only: false, default_enabled: false, example: <<-EOS Feature.enabled?(:my_feature_flag, project) @@ -26,6 +28,7 @@ class Feature description: "Long-lived feature flags that control operational aspects of GitLab's behavior", optional: true, rollout_issue: false, + ee_only: false, default_enabled: false, example: <<-EOS Feature.enabled?(:my_ops_flag, type: ops) @@ -36,6 +39,7 @@ class Feature description: 'Permanent feature flags used to temporarily disable licensed features.', optional: true, rollout_issue: false, + ee_only: true, default_enabled: true, example: <<-EOS project.feature_available?(:my_licensed_feature) @@ -44,13 +48,15 @@ class Feature } }.freeze + # The ordering of PARAMS defines an order in YAML + # This is done to ease the file comparison PARAMS = %i[ name - default_enabled - type introduced_by_url rollout_issue_url + type group + default_enabled ].freeze end end |