diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
commit | be834a25982746ffd85252ff502df42bb88cb9d5 (patch) | |
tree | b4d6a8ba0931e12fac08f05abea33a3b8ec2c8a2 /lib/feature/shared.rb | |
parent | ee925a3597f27e92f83a50937a64068109675b3d (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc32
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 |