Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9dcb4445
Commit
9dcb4445
authored
Dec 03, 2020
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cd_auto_rollback feature flag
This commit cleans up the feature flag
parent
4f2c23a7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
59 deletions
+15
-59
config/feature_flags/development/cd_auto_rollback.yml
config/feature_flags/development/cd_auto_rollback.yml
+0
-8
ee/app/controllers/ee/projects_controller.rb
ee/app/controllers/ee/projects_controller.rb
+1
-1
ee/app/models/ee/project_ci_cd_setting.rb
ee/app/models/ee/project_ci_cd_setting.rb
+1
-1
ee/app/views/projects/settings/ci_cd/_auto_rollback.html.haml
...pp/views/projects/settings/ci_cd/_auto_rollback.html.haml
+1
-1
ee/spec/features/projects/settings/auto_rollback_spec.rb
ee/spec/features/projects/settings/auto_rollback_spec.rb
+2
-21
ee/spec/models/ee/alert_management/alert_spec.rb
ee/spec/models/ee/alert_management/alert_spec.rb
+0
-12
ee/spec/models/project_ci_cd_setting_spec.rb
ee/spec/models/project_ci_cd_setting_spec.rb
+10
-11
lib/gitlab/ci/features.rb
lib/gitlab/ci/features.rb
+0
-4
No files found.
config/feature_flags/development/cd_auto_rollback.yml
deleted
100644 → 0
View file @
4f2c23a7
---
name
:
cd_auto_rollback
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45816
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/35404
milestone
:
'
13.6'
type
:
development
group
:
group::progressive delivery
default_enabled
:
false
ee/app/controllers/ee/projects_controller.rb
View file @
9dcb4445
...
...
@@ -95,7 +95,7 @@ module EE
attrs
+=
compliance_framework_params
if
::
Gitlab
::
Ci
::
Features
.
auto_rollback_available?
(
project
)
if
project
&
.
feature_available?
(
:auto_rollback
)
attrs
<<
:auto_rollback_enabled
end
...
...
ee/app/models/ee/project_ci_cd_setting.rb
View file @
9dcb4445
...
...
@@ -25,7 +25,7 @@ module EE
end
def
auto_rollback_enabled?
super
&&
::
Gitlab
::
Ci
::
Features
.
auto_rollback_available?
(
project
)
super
&&
project
.
feature_available?
(
:auto_rollback
)
end
private
...
...
ee/app/views/projects/settings/ci_cd/_auto_rollback.html.haml
View file @
9dcb4445
-
if
Gitlab
::
Ci
::
Features
.
auto_rollback_available?
(
@project
)
-
if
@project
.
feature_available?
(
:auto_rollback
)
%section
.settings.no-animate
#auto-rollback-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
...
...
ee/spec/features/projects/settings/auto_rollback_spec.rb
View file @
9dcb4445
...
...
@@ -28,34 +28,15 @@ RSpec.describe 'Automatic Deployment Rollbacks' do
end
end
context
'when
cd_auto_rollback and auto_rollback are disabled
'
do
context
'when
project does not have a license for auto_rollback feature
'
do
before
do
stub_feature_flags
(
cd_auto_rollback:
false
)
stub_licensed_features
(
auto_rollback:
false
)
end
it_behaves_like
'the auto rollback feature is not available'
end
context
'when cd_auto_rollback is disabled and auto_rollback is enabled'
do
before
do
stub_licensed_features
(
auto_rollback:
true
)
stub_feature_flags
(
cd_auto_rollback:
false
)
end
it_behaves_like
'the auto rollback feature is not available'
end
context
'when cd_auto_rollback is enabled and auto_rollback is disabled'
do
before
do
stub_feature_flags
(
cd_auto_rollback:
true
)
stub_licensed_features
(
auto_rollback:
false
)
end
it_behaves_like
'the auto rollback feature is not available'
end
context
'when cd_auto_rollback and auto_rollback are enabled'
do
context
'when project has a license for auto_rollback feature'
do
before
do
stub_licensed_features
(
auto_rollback:
true
)
project
.
add_maintainer
(
user
)
...
...
ee/spec/models/ee/alert_management/alert_spec.rb
View file @
9dcb4445
...
...
@@ -75,17 +75,5 @@ RSpec.describe EE::AlertManagement::Alert do
subject
end
end
context
'when feature flag is disabled'
do
before
do
stub_feature_flags
(
cd_auto_rollback:
false
)
end
it
'does not execute AutoRollbackWorker'
do
expect
(
Deployments
::
AutoRollbackWorker
).
not_to
receive
(
:perform_async
)
subject
end
end
end
end
ee/spec/models/project_ci_cd_setting_spec.rb
View file @
9dcb4445
...
...
@@ -81,26 +81,25 @@ RSpec.describe ProjectCiCdSetting do
let
(
:project
)
{
create
(
:project
)
}
where
(
:license_feature
,
:
feature_flag
,
:
actual_setting
)
do
true
|
true
|
true
false
|
true
|
true
true
|
false
|
true
false
|
false
|
true
true
|
true
|
false
false
|
true
|
false
true
|
false
|
false
false
|
false
|
false
where
(
:license_feature
,
:actual_setting
)
do
true
|
true
false
|
true
true
|
true
false
|
true
true
|
false
false
|
false
true
|
false
false
|
false
end
with_them
do
before
do
stub_licensed_features
(
auto_rollback:
license_feature
)
stub_feature_flags
(
cd_auto_rollback:
feature_flag
)
project
.
auto_rollback_enabled
=
actual_setting
end
it
'is only enabled if set and both the license and the feature flag allows'
do
expect
(
project
.
auto_rollback_enabled?
).
to
be
(
actual_setting
&&
license_feature
&&
feature_flag
)
expect
(
project
.
auto_rollback_enabled?
).
to
be
(
actual_setting
&&
license_feature
)
end
end
end
...
...
lib/gitlab/ci/features.rb
View file @
9dcb4445
...
...
@@ -55,10 +55,6 @@ module Gitlab
::
Feature
.
enabled?
(
:ci_trace_log_invalid_chunks
,
project
,
type: :ops
,
default_enabled:
false
)
end
def
self
.
auto_rollback_available?
(
project
)
::
Feature
.
enabled?
(
:cd_auto_rollback
,
project
)
&&
project
&
.
feature_available?
(
:auto_rollback
)
end
def
self
.
seed_block_run_before_workflow_rules_enabled?
(
project
)
::
Feature
.
enabled?
(
:ci_seed_block_run_before_workflow_rules
,
project
,
default_enabled:
true
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment