Feature Categorization
Each Sidekiq worker, Batched Background migrations, controller action, test example or API endpoint
must declare a feature_category attribute. This attribute maps each
of these to a feature category. This
is done for error budgeting, alert routing, and team attribution.
The list of feature categories can be found in the file config/feature_categories.yml.
This file is generated from the
stages.yml
data file used in the GitLab Handbook and other GitLab resources.
Updating config/feature_categories.yml
Occasionally new features will be added to GitLab stages, groups, and
product categories. When this occurs, you can automatically update
config/feature_categories.yml by running
scripts/update-feature-categories. This script will fetch and parse
stages.yml
and generate a new version of the file, which needs to be committed to
the repository.
The Observability team
currently maintains the feature_categories.yml file. They will automatically be
notified on Slack when the file becomes outdated.
Gemfile
For each Ruby gem dependency we should specify which feature category requires this dependency. This should clarify ownership and we can delegate upgrading to the respective group owning the feature.
Tooling feature category
For Developer Experience internal tooling we use feature_category: :tooling.
For example, knapsack and gitlab-crystalball are both used to run RSpec test
suites in CI and they don’t belong to any product groups.
Test platform feature category
Gems that relate to end-to-end test infrastructure are maintained by the Development Experience section. We use the feature_category: :test_platform label.
For example, capybara is defined in both Gemfile and qa/Gemfile to run tests involving UI. They don’t belong to a specific product group.
Rails platform feature category
Rails core framework gems are primarily maintained by
Backend Maintainers.
For example, rails, and zeitwerk should be defined as :rails_platform.
Shared feature category
The :shared feature category is no longer supported for gems.
As part of efforts to provide good maintenance of gems, all gems must
use a specific feature category.
If you are uncertain about the ownership of a gem, please reach out to the
#backend_maintainers channel for help.
Sidekiq workers
The declaration uses the feature_category class method, as shown below.
class SomeScheduledTaskWorker
include ApplicationWorker
# Declares that this worker is part of the
# `continuous_integration` feature category