Feature Flag YAML definition
TL;DR
We will make each feature flag explicit and well documented as part of YAML definition stored in repository.
Related to: #30228 (closed) and !31610 (closed). They contain all prior discussions.
Proposal
- We introduce
bin/feature-flag
to easily add feature flag - We store each feature flag as
YAML
- We introduce feature flag types
- We strongly validate feature flag usage,
default_enabled/type
YAML
---
name: ci_project_subscriptions
introduced_by_url:
rollout_issue_url:
group: 'group::verify'
type: licensed
default_enabled: true
bin/feature-flag
➜ gitlab-rails bin/feature-flag my-feature-flag
>> Please specify the type of your feature flag:
development Short lived, used to enable unfinished code to be deployed
?> development
>> Please specify the group introducing feature flag, like `group::apm`:
?> group::apm
>> Open this URL and fill the rest of details:
https://gitlab.com/gitlab-org/gitlab/-/issues/new?issue[title]=%5BFeature+flag%5D+Rollout+of+%60my-feature-flag%60%60&
>> Paste URL here, or enter to skip:
?>
create config/feature_flags/development/my-feature-flag.yml
---
name: my-feature-flag
introduced_by_url:
rollout_issue_url:
group: group::apm
type: development
default_enabled: false
Edited by Kamil Trzciński