Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
e113671f
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e113671f
编写于
8月 15, 2018
作者:
Z
Zeger-Jan van de Weg
提交者:
Robert Speicher
8月 15, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add Acceptance testing issue template
上级
085ed286
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
135 addition
and
2 deletion
+135
-2
.gitlab/issue_templates/Acceptance_Testing.md
.gitlab/issue_templates/Acceptance_Testing.md
+100
-0
app/models/namespace.rb
app/models/namespace.rb
+1
-1
doc/development/feature_flags.md
doc/development/feature_flags.md
+34
-1
未找到文件。
.gitlab/issue_templates/Acceptance_Testing.md
0 → 100644
浏览文件 @
e113671f
## Details
-
**Feature Toggle Name**
:
`FEATURE_NAME`
-
**Required GitLab Version**
:
`vX.X`
--------------------------------------------------------------------------------
## 1. Preparation
-
[ ]
**Controllers and workers**
:
1.
Please link to dashboards of the workers, and the controllers and actions that can be impacted
2.
...
3.
...
## 2. Development Trial
#### Check Dev Server Versions
-
[ ] GitLab: https://dev.gitlab.org/help
#### Enable on `dev.gitlab.org`:
-
[
] `/chatops feature set FEATURE_NAME true --dev` in [`#dev-gitlab`
](
https://gitlab.slack.com/messages/C6WQ87MU3
)
Then leave running while monitoring and performing some testing through web, api or SSH.
#### Monitor
-
[
] [Monitor Using Grafana
](
https://dashboards.gitlab.net
)
-
[
] [Inspect logs in ELK
](
https://log.gitlab.net/app/kibana
)
-
[
] [Check for errors in GitLab Dev Sentry
](
https://sentry.gitlap.com/gitlab/devgitlaborg/?query=is%3Aunresolved
)
## 2. Staging Trial
#### Check Staging Server Versions
-
[ ] GitLab: https://staging.gitlab.com/help
#### Enable on `staging.gitlab.com`
-
[
] `/chatops run feature set FEATURE_NAME true --staging` in [`#development`
](
https://gitlab.slack.com/messages/C02PF508L/
)
Then leave running while monitoring for at least
**15 minutes**
while performing some testing through web, api or SSH.
#### Monitor
-
[
] [Monitor Using Grafana
](
https://dashboards.gitlab.net
)
-
[
] [Inspect logs in ELK
](
https://log.gitlab.net/app/kibana
)
-
[
] [Check for errors in GitLab Sentry
](
https://sentry.gitlap.com/gitlab/gitlabcom/?query=is%3Aunresolved
)
## 4. Production Server Version Check
-
[ ] GitLab: https://gitlab.com/help
## 5. Initial Impact Check
-
[ ] Enable for a subset of users, when using percentage gates: 1%.
Then leave running while monitoring for at least
**15 minutes**
while performing some testing through web, api or SSH.
#### Monitor
-
[
] [Monitor Using Grafana
](
https://dashboards.gitlab.net
)
-
[
] [Inspect logs in ELK
](
https://log.gitlab.net/app/kibana
)
-
[
] [Check for errors in GitLab Sentry
](
https://sentry.gitlap.com/gitlab/gitlabcom/?query=is%3Aunresolved
)
## 6. Low Impact Check
-
[ ] Enable for a bigger subset of users, when using percentage gates: 10%.
Then leave running while monitoring for at least
**30 minutes**
while performing some testing through web, api or SSH.
#### Monitor
-
[
] [Monitor Using Grafana
](
https://dashboards.gitlab.net
)
-
[
] [Inspect logs in ELK
](
https://log.gitlab.net/app/kibana
)
-
[
] [Check for errors in GitLab Sentry
](
https://sentry.gitlap.com/gitlab/gitlabcom/?query=is%3Aunresolved
)
## 7. Mid Impact Trial
-
[ ] Enable for a big subset of users, when using percentage gates: 50%.
Then leave running while monitoring for at least
**12 hours**
while performing some testing through web, api or SSH.
#### Monitor
-
[
] [Monitor Using Grafana
](
https://dashboards.gitlab.net
)
-
[
] [Inspect logs in ELK
](
https://log.gitlab.net/app/kibana
)
-
[
] [Check for errors in GitLab Sentry
](
https://sentry.gitlap.com/gitlab/gitlabcom/?query=is%3Aunresolved
)
## 8. Full Impact Trial
-
[ ] Enable for all users:
`
/chatops run feature set FEATURE_NAME true
Then leave running while monitoring for at least
**1 week**
.
#### Monitor
-
[
] [Monitor Using Grafana
](
https://dashboards.gitlab.net
)
-
[
] [Inspect logs in ELK
](
https://log.gitlab.net/app/kibana
)
-
[
] [Check for errors in GitLab Dev Sentry
](
https://sentry.gitlap.com/gitlab/devgitlaborg/?query=is%3Aunresolved
)
#### Success?
-
[ ] Remove the feature gate from the code, and close this issue with that MR.
app/models/namespace.rb
浏览文件 @
e113671f
...
...
@@ -10,6 +10,7 @@ class Namespace < ActiveRecord::Base
include
Storage
::
LegacyNamespace
include
Gitlab
::
SQL
::
Pattern
include
IgnorableColumn
include
FeatureGate
ignore_column
:deleted_at
...
...
@@ -124,7 +125,6 @@ class Namespace < ActiveRecord::Base
def
to_param
full_path
end
alias_method
:flipper_id
,
:to_param
def
human_name
owner_name
...
...
doc/development/feature_flags.md
浏览文件 @
e113671f
...
...
@@ -20,7 +20,40 @@ dynamic (querying the DB etc.).
Once defined in
`lib/feature.rb`
, you will be able to activate a
feature for a given feature group via the
[
`feature_group` param of the features API
](
../api/features.md#set-or-create-a-feature
)
For GitLab.com, team members have access to feature flags through chatops. Only
percentage gates are supported at this time. Setting a feature to be used 50% of
the time, you should execute
`/chatops run feature set my_feature_flag 50`
.
## Feature flags for user applications
GitLab does not yet support the use of feature flags in deployed user applications.
You can follow the progress on that
[
in the issue on our issue tracker
](
https://gitlab.com/gitlab-org/gitlab-ee/issues/779
)
.
\ No newline at end of file
You can follow the progress on that
[
in the issue on our issue tracker
](
https://gitlab.com/gitlab-org/gitlab-ee/issues/779
)
.
## Developing with feature flags
In general, it's better to have a group- or user-based gate, and you should prefer
it over the use of percentage gates. This would make debugging easier, as you
filter for example logs and errors based on actors too. Futhermore, this allows
for enabling for the
`gitlab-org`
group first, while the rest of the users
aren't impacted.
```
ruby
# Good
Feature
.
enabled?
(
:feature_flag
,
project
)
# Avoid, if possible
Feature
.
enabled?
(
:feature_flag
)
```
To use feature gates based on actors, the model needs to respond to
`flipper_id`
. For example, to enable for the Foo model:
```
ruby
class
Foo
<
ActiveRecord
::
Base
include
FeatureGate
end
```
Features that are developed and are intended to be merged behind a feature flag
should not include a changelog entry. The entry should be added in the merge
request removing the feature flags.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录