diff --git a/ee/app/workers/compliance_management/timeout_pending_status_check_responses_worker.rb b/ee/app/workers/compliance_management/timeout_pending_status_check_responses_worker.rb index 10c53fba3721dd003e940ca67a377ca12f4fb8d3..9f0cf0bd729582dd0f0ae459651b10d5cf0f3c6a 100644 --- a/ee/app/workers/compliance_management/timeout_pending_status_check_responses_worker.rb +++ b/ee/app/workers/compliance_management/timeout_pending_status_check_responses_worker.rb @@ -13,8 +13,6 @@ class TimeoutPendingStatusCheckResponsesWorker urgency :high def perform - return unless Feature.enabled?(:timeout_status_check_responses) - ::MergeRequests::StatusCheckResponse.pending.each_batch do |batch| batch.timeout_eligible.update_all(status: 'failed') end diff --git a/ee/config/feature_flags/development/timeout_status_check_responses.yml b/ee/config/feature_flags/development/timeout_status_check_responses.yml deleted file mode 100644 index 4455bef639f42a03c6c6ac0556843ca252e701f0..0000000000000000000000000000000000000000 --- a/ee/config/feature_flags/development/timeout_status_check_responses.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: timeout_status_check_responses -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/133383 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/427356 -milestone: '16.6' -type: development -group: group::compliance -default_enabled: true diff --git a/ee/spec/workers/compliance_management/timeout_pending_status_check_responses_worker_spec.rb b/ee/spec/workers/compliance_management/timeout_pending_status_check_responses_worker_spec.rb index 52e0859ca2cd375c3031bfa4d034166bfc858e74..6ac185abca1f7053f54c7d2c57472d2ac98c07a3 100644 --- a/ee/spec/workers/compliance_management/timeout_pending_status_check_responses_worker_spec.rb +++ b/ee/spec/workers/compliance_management/timeout_pending_status_check_responses_worker_spec.rb @@ -17,36 +17,19 @@ create(:recent_retried_pending_status_check_response) end - context 'when feature flag `timeout_status_check_responses` is enabled' do - it 'sets qualified `pending` status check responses to failed' do - worker.perform + it 'sets qualified `pending` status check responses to failed' do + worker.perform - expect(recent_pending_status_check_response.status).to eq('pending') - expect(recent_retried_pending_status_check_response.status).to eq('pending') + expect(recent_pending_status_check_response.status).to eq('pending') + expect(recent_retried_pending_status_check_response.status).to eq('pending') - expect(old_pending_status_check_response.status).to eq('failed') - expect(old_retried_pending_status_check_response.status).to eq('failed') - end - - it 'does not update existing `passed` or `failed` status check responses' do - expect(old_passed_status_check_response.status).to eq('passed') - expect(old_failed_status_check_response.status).to eq('failed') - end + expect(old_pending_status_check_response.status).to eq('failed') + expect(old_retried_pending_status_check_response.status).to eq('failed') end - context 'when feature flag `timeout_status_check_responses` is disabled' do - before do - stub_feature_flags(timeout_status_check_responses: false) - end - - it 'does not update status check responses' do - worker.perform - - expect(recent_pending_status_check_response.status).to eq('pending') - expect(recent_retried_pending_status_check_response.status).to eq('pending') - expect(old_pending_status_check_response.status).to eq('pending') - expect(old_retried_pending_status_check_response.status).to eq('pending') - end + it 'does not update existing `passed` or `failed` status check responses' do + expect(old_passed_status_check_response.status).to eq('passed') + expect(old_failed_status_check_response.status).to eq('failed') end it_behaves_like 'an idempotent worker'