Skip to content
代码片段 群组 项目
提交 c79fc6c2 编辑于 作者: Amy Qualls's avatar Amy Qualls
浏览文件

Merge branch 'kassio/gitlab-pages-docs-about-feature-flags' into 'master'

Add documentation about GitLab Pages feature flags

See merge request gitlab-org/gitlab!93287
No related branches found
No related tags found
无相关合并请求
......@@ -178,6 +178,9 @@ All validations are skipped when running in `RAILS_ENV=production`.
## Create a new feature flag
NOTE:
GitLab Pages uses [a different process](../pages/index.md#feature-flags) for feature flags.
The GitLab codebase provides [`bin/feature-flag`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/bin/feature-flag),
a dedicated tool to create new feature flag definitions.
The tool asks various questions about the new feature flag, then creates
......
......@@ -236,3 +236,29 @@ make acceptance
# so we want to have the latest changes in the build that is tested
make && go test ./ -run TestRedirect
```
## Contributing
### Feature flags
WARNING:
All newly-introduced feature flags should be [disabled by default](https://about.gitlab.com/handbook/product-development-flow/feature-flag-lifecycle/#feature-flags-in-gitlab-development).
Consider adding a [feature flag](../feature_flags/index.md) for any non-trivial changes.
Feature flags can make the release and rollback of these changes easier, avoiding
incidents and downtime. To add a new feature flag to GitLab Pages:
1. Create the feature flag in
[`internal/feature/feature.go`](https://gitlab.com/gitlab-org/gitlab-pages/-/blob/master/internal/feature/feature.go),
which must be **off** by default.
1. Create an issue to track the feature flag using the `Feature Flag` template.
1. Add the `~"feature flag"` label to any merge requests that handle feature flags.
For GitLab Pages, the feature flags are controlled by environment variables at a global level. It
A deployment at the service level is required to change the state of a feature flag.
Example of an merge request enabling a GitLab Pages feature flag:
[Enforce GitLab Pages rate limits](https://gitlab.com/gitlab-com/gl-infra/k8s-workloads/gitlab-com/-/merge_requests/1500)
## Related topics
- [Feature flags in the development of GitLab](../feature_flags/index.md)
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册