Skip to content
Snippets Groups Projects
Commit b472fd82 authored by Shinya Maeda's avatar Shinya Maeda
Browse files

Remove the feature flag for auto stop environments

This commit removes the feature flag
parent a35c69b4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -30,7 +30,7 @@ def execute
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
Loading
Loading
Loading
Loading
@@ -8,8 +8,6 @@ class AutoStopCronWorker # rubocop:disable Scalability/IdempotentWorker
feature_category :continuous_delivery
 
def perform
return unless Feature.enabled?(:auto_stop_environments, default_enabled: true)
AutoStopService.new.execute
end
end
Loading
Loading
Loading
Loading
@@ -40,18 +40,6 @@
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)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment