diff --git a/app/services/ci/update_build_state_service.rb b/app/services/ci/update_build_state_service.rb index bd76f6dbda895deab32a21b716873c2a9f879c31..b233fa69bfa1f256ea8b03816fcc57157307dab8 100644 --- a/app/services/ci/update_build_state_service.rb +++ b/app/services/ci/update_build_state_service.rb @@ -217,8 +217,7 @@ def in_build_trace_lock(&block) end def chunks_migration_enabled? - ::Feature.enabled?(:ci_enable_live_trace, build.project) && - ::Feature.enabled?(:ci_accept_trace, build.project, type: :ops) + ::Feature.enabled?(:ci_enable_live_trace, build.project) end def log_invalid_chunks? diff --git a/config/feature_flags/ops/ci_accept_trace.yml b/config/feature_flags/ops/ci_accept_trace.yml deleted file mode 100644 index 9e386085ab94a6b13f1ce60eeac2dc7517bed2f2..0000000000000000000000000000000000000000 --- a/config/feature_flags/ops/ci_accept_trace.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: ci_accept_trace -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41304 -rollout_issue_url: -milestone: '13.4' -type: ops -group: group::pipeline execution -default_enabled: true diff --git a/spec/requests/api/ci/runner/jobs_put_spec.rb b/spec/requests/api/ci/runner/jobs_put_spec.rb index 65489ea7015f8547970517f9d9db78fe8aa419bd..b2afd9e0cfab2b323140fffa6d1947c53d1c28f3 100644 --- a/spec/requests/api/ci/runner/jobs_put_spec.rb +++ b/spec/requests/api/ci/runner/jobs_put_spec.rb @@ -148,62 +148,56 @@ end context 'when unmigrated live trace chunks exist' do - context 'when accepting trace feature is enabled' do - before do - stub_feature_flags(ci_accept_trace: true) - end - - context 'when checksum is present' do - context 'when live trace chunk is still live' do - it 'responds with 202' do - update_job(state: 'success', checksum: 'crc32:12345678') - - expect(job.pending_state).to be_present - expect(response).to have_gitlab_http_status(:accepted) - expect(response.header['X-GitLab-Trace-Update-Interval']).to be > 0 - end + context 'when checksum is present' do + context 'when live trace chunk is still live' do + it 'responds with 202' do + update_job(state: 'success', checksum: 'crc32:12345678') + + expect(job.pending_state).to be_present + expect(response).to have_gitlab_http_status(:accepted) + expect(response.header['X-GitLab-Trace-Update-Interval']).to be > 0 end + end - context 'when runner retries request after receiving 202' do - it 'responds with 202 and then with 200', :sidekiq_inline do - update_job(state: 'success', checksum: 'crc32:12345678') + context 'when runner retries request after receiving 202' do + it 'responds with 202 and then with 200', :sidekiq_inline do + update_job(state: 'success', checksum: 'crc32:12345678') - expect(response).to have_gitlab_http_status(:accepted) - expect(job.reload.pending_state).to be_present + expect(response).to have_gitlab_http_status(:accepted) + expect(job.reload.pending_state).to be_present - update_job(state: 'success', checksum: 'crc32:12345678') + update_job(state: 'success', checksum: 'crc32:12345678') - expect(response).to have_gitlab_http_status(:ok) - expect(job.reload.pending_state).not_to be_present - end + expect(response).to have_gitlab_http_status(:ok) + expect(job.reload.pending_state).not_to be_present end + end - context 'when live trace chunk has been migrated' do - before do - job.trace_chunks.first.update!(data_store: :database) - end - - it 'responds with 200' do - update_job(state: 'success', checksum: 'crc:12345678') - - expect(job.reload).to be_success - expect(job.pending_state).to be_present - expect(response).to have_gitlab_http_status(:ok) - expect(response.header).not_to have_key('X-GitLab-Trace-Update-Interval') - end + context 'when live trace chunk has been migrated' do + before do + job.trace_chunks.first.update!(data_store: :database) end - end - context 'when checksum is not present' do it 'responds with 200' do - update_job(state: 'success') + update_job(state: 'success', checksum: 'crc:12345678') expect(job.reload).to be_success - expect(job.pending_state).not_to be_present + expect(job.pending_state).to be_present expect(response).to have_gitlab_http_status(:ok) + expect(response.header).not_to have_key('X-GitLab-Trace-Update-Interval') end end end + + context 'when checksum is not present' do + it 'responds with 200' do + update_job(state: 'success') + + expect(job.reload).to be_success + expect(job.pending_state).not_to be_present + expect(response).to have_gitlab_http_status(:ok) + end + end end end