diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2021-04-23 13:28:02 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2021-04-23 13:28:02 +0300 |
commit | 0937692dbb9b8a68b4cd4d8397676a0fd5b80230 (patch) | |
tree | 4660677b9bd99a54af1b9b67040a663c6c46fcf2 /layouts/feature_flags_table.md.erb | |
parent | fb7ce2e82d38f5a3367dcac9490ca71bad8cc312 (diff) |
Extends `docs.gitlab.com` with feature flags table
Diffstat (limited to 'layouts/feature_flags_table.md.erb')
-rw-r--r-- | layouts/feature_flags_table.md.erb | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/layouts/feature_flags_table.md.erb b/layouts/feature_flags_table.md.erb new file mode 100644 index 00000000..4aed2dfa --- /dev/null +++ b/layouts/feature_flags_table.md.erb @@ -0,0 +1,68 @@ +<% +feature_flags_yaml = @items["/_data/feature_flags.yaml"] + +def enabled_state(ff) + ff[:default_enabled] ? 'Enabled' : 'Disabled' +end + +def enabled_count(ffs) + ffs.count { |ff| ff[:default_enabled] } +end + +def disabled_count(ffs) + ffs.count { |ff| !ff[:default_enabled] } +end +%> +## Available feature flags + +The feature flags available to you depend on: + +- Whether you use the GitLab Community Edition or GitLab Enterprise Edition [software distribution](https://about.gitlab.com/install/ce-or-ee/). +- The version of GitLab you use. +- Whether the feature is enabled or disabled on your GitLab self-managed instance or GitLab + SaaS. + +The following sections describe the **default** state of each feature flag. + +<% feature_flags_yaml[:products].each do |product, ffs| %> +### <%= product %> + +<%= ffs.count %> feature flags are available in <%= product %>. + +<% sorted_ff = ffs.sort_by { |ff| ff[:name] } %> + +| Name | Group | Milestone | Default state | Rollout issue | +|------|--------|-----------|---------------|---------------| +<% sorted_ff.each do |ff| %>| <%= ff[:introduced_by_url] ? "[`#{ff[:name]}`](#{ff[:introduced_by_url]})" : "`#{ff[:name]}`" %> | `<%= ff[:group] || 'Not defined' %>` | <%= ff[:milestone] || 'Not defined' %> | <%= enabled_state(ff) %> | <%= ff[:rollout_issue_url] ? "<#{ff[:rollout_issue_url]}>" : 'Not defined' %> | +<% end %> + +<% end %> + +## Ownership by group + +GitLab features are developed by +[engineering groups](https://about.gitlab.com/handbook/product/categories/) that implement features +using feature flags. + +<% all_ffs = feature_flags_yaml[:products].map { |_, ffs| ffs }.flatten %> +<% ff_groups = all_ffs.group_by { |ff| ff[:group] || 'Not defined' }.sort_by { |group, _| group } %> + +| Group | Count | Enabled | Disabled | +|-------|-------|---------|----------| +<% ff_groups.each do |group, ffs| %> | `<%= group %>` | <%= ffs.count %> | <%= enabled_count(ffs) %> | <%= disabled_count(ffs) %> | +<% end %> + +## Count by milestone + +GitLab features [are delivered](https://about.gitlab.com/handbook/engineering/releases/): + +- Continuously for GitLab SaaS. +- On the 22nd of every month according to specific milestones for GitLab self-managed. + +<% all_ffs = feature_flags_yaml[:products].map { |_, ffs| ffs }.flatten %> +<% ff_milestones = all_ffs.group_by { |ff| ff[:milestone].to_s || 'Not defined' }.sort_by { |milestone, _| milestone } %> + +| Milestone | Count | Enabled | Disabled | +|-----------|-------|---------|----------| +<% ff_milestones.each do |milestone, ffs| %> | <%= milestone %> | <%= ffs.count %> | <%= enabled_count(ffs) %> | <%= disabled_count(ffs) %> | +<% end %> |