diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-08 03:08:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-08 03:08:15 +0300 |
commit | 27e1dab1ed98c46c91b85e8c5dd1cefd62c0cb96 (patch) | |
tree | 1d4782010e55b9ca487665db3ebdf5ebd6cf866b | |
parent | 88c1578ca6748bec0929736d475e9882e1dc4b82 (diff) |
Add latest changes from gitlab-org/gitlab@16-6-stable-ee
4 files changed, 0 insertions, 39 deletions
diff --git a/app/models/concerns/ci/deployable.rb b/app/models/concerns/ci/deployable.rb index 844c8a1fa7d..e8c4f10f1ca 100644 --- a/app/models/concerns/ci/deployable.rb +++ b/app/models/concerns/ci/deployable.rb @@ -18,14 +18,6 @@ module Ci end end - after_transition any => [:failed] do |job| - next unless job.stops_environment? - - job.run_after_commit do - Environments::StopJobFailedWorker.perform_async(id) - end - end - # Synchronize Deployment Status # Please note that the data integrity is not assured because we can't use # a database transaction due to DB decomposition. diff --git a/app/workers/environments/auto_stop_cron_worker.rb b/app/workers/environments/auto_stop_cron_worker.rb index 26b18c406e5..4d6453a85e7 100644 --- a/app/workers/environments/auto_stop_cron_worker.rb +++ b/app/workers/environments/auto_stop_cron_worker.rb @@ -13,7 +13,6 @@ module Environments def perform AutoStopService.new.execute - AutoRecoverService.new.execute end end end diff --git a/spec/support/shared_examples/ci/deployable_shared_examples.rb b/spec/support/shared_examples/ci/deployable_shared_examples.rb index 0781eec1b4b..4f43d38e604 100644 --- a/spec/support/shared_examples/ci/deployable_shared_examples.rb +++ b/spec/support/shared_examples/ci/deployable_shared_examples.rb @@ -166,28 +166,6 @@ RSpec.shared_examples 'a deployable job' do expect(deployment).to be_failed end - - context 'when the job is a stop job' do - before do - job.update!(environment: 'review', options: { environment: { action: 'stop' } }) - end - - it 'enqueues Environments::StopJobFailedWorker' do - expect(Environments::StopJobFailedWorker) - .to receive(:perform_async) - - subject - end - end - - context 'when the job is not a stop job' do - it 'does not enqueue Environments::StopJobFailedWorker' do - expect(Environments::StopJobFailedWorker) - .not_to receive(:perform_async) - - subject - end - end end context 'when transits to skipped' do diff --git a/spec/workers/environments/auto_stop_cron_worker_spec.rb b/spec/workers/environments/auto_stop_cron_worker_spec.rb index 14a74022a1f..ad44cf97e07 100644 --- a/spec/workers/environments/auto_stop_cron_worker_spec.rb +++ b/spec/workers/environments/auto_stop_cron_worker_spec.rb @@ -14,12 +14,4 @@ RSpec.describe Environments::AutoStopCronWorker, feature_category: :continuous_d subject end - - it 'executes Environments::AutoRecoverService' do - expect_next_instance_of(Environments::AutoRecoverService) do |service| - expect(service).to receive(:execute) - end - - subject - end end |