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
b472fd82
Commit
b472fd82
authored
Apr 08, 2020
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the feature flag for auto stop environments
This commit removes the feature flag
parent
a35c69b4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
18 deletions
+1
-18
app/controllers/projects/environments_controller.rb
app/controllers/projects/environments_controller.rb
+0
-3
app/services/environments/auto_stop_service.rb
app/services/environments/auto_stop_service.rb
+1
-1
app/workers/environments/auto_stop_cron_worker.rb
app/workers/environments/auto_stop_cron_worker.rb
+0
-2
spec/services/environments/auto_stop_service_spec.rb
spec/services/environments/auto_stop_service_spec.rb
+0
-12
No files found.
app/controllers/projects/environments_controller.rb
View file @
b472fd82
...
...
@@ -15,9 +15,6 @@ class Projects::EnvironmentsController < Projects::ApplicationController
before_action
only:
[
:metrics
,
:additional_metrics
,
:metrics_dashboard
]
do
push_frontend_feature_flag
(
:prometheus_computed_alerts
)
end
before_action
do
push_frontend_feature_flag
(
:auto_stop_environments
,
default_enabled:
true
)
end
after_action
:expire_etag_cache
,
only:
[
:cancel_auto_stop
]
def
index
...
...
app/services/environments/auto_stop_service.rb
View file @
b472fd82
...
...
@@ -30,7 +30,7 @@ module Environments
def
stop_in_batch
environments
=
Environment
.
auto_stoppable
(
BATCH_SIZE
)
return
false
unless
environments
.
exists?
&&
Feature
.
enabled?
(
:auto_stop_environments
,
default_enabled:
true
)
return
false
unless
environments
.
exists?
Ci
::
StopEnvironmentsService
.
execute_in_batch
(
environments
)
end
...
...
app/workers/environments/auto_stop_cron_worker.rb
View file @
b472fd82
...
...
@@ -8,8 +8,6 @@ module Environments
feature_category
:continuous_delivery
def
perform
return
unless
Feature
.
enabled?
(
:auto_stop_environments
,
default_enabled:
true
)
AutoStopService
.
new
.
execute
end
end
...
...
spec/services/environments/auto_stop_service_spec.rb
View file @
b472fd82
...
...
@@ -40,18 +40,6 @@ describe Environments::AutoStopService, :clean_gitlab_redis_shared_state do
expect
(
Ci
::
Build
.
where
(
name:
'stop_review_app'
).
map
(
&
:status
).
uniq
).
to
eq
([
'pending'
])
end
context
'when auto_stop_environments feature flag is disabled'
do
before
do
stub_feature_flags
(
auto_stop_environments:
false
)
end
it
'does not execute Ci::StopEnvironmentsService'
do
expect
(
Ci
::
StopEnvironmentsService
).
not_to
receive
(
:execute_in_batch
)
subject
end
end
context
'when the other sidekiq worker has already been running'
do
before
do
stub_exclusive_lease_taken
(
described_class
::
EXCLUSIVE_LOCK_KEY
)
...
...
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