Commit 40fa5ae7 authored by Shinya Maeda's avatar Shinya Maeda

Merge branch 'live-trace-v2' into live-trace-v2-efficient-destroy-all

parents 9e65dc53 950df8ba
...@@ -120,7 +120,7 @@ module Ci ...@@ -120,7 +120,7 @@ module Ci
def schedule_to_db def schedule_to_db
return if db? return if db?
BuildTraceSwapChunkWorker.perform_async(id) BuildTraceChunkFlushToDBWorker.perform_async(id)
end end
def fullfilled? def fullfilled?
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
- pipeline_processing:pipeline_update - pipeline_processing:pipeline_update
- pipeline_processing:stage_update - pipeline_processing:stage_update
- pipeline_processing:update_head_pipeline_for_merge_request - pipeline_processing:update_head_pipeline_for_merge_request
- pipeline_processing:build_trace_swap_chunk - pipeline_processing:build_trace_chunk_flush_to_db
- repository_check:repository_check_clear - repository_check:repository_check_clear
- repository_check:repository_check_single_repository - repository_check:repository_check_single_repository
......
class BuildTraceSwapChunkWorker class BuildTraceChunkFlushToDBWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
...@@ -10,6 +10,10 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do ...@@ -10,6 +10,10 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do
described_class.new(build: build, chunk_index: chunk_index, data_store: data_store, raw_data: raw_data) described_class.new(build: build, chunk_index: chunk_index, data_store: data_store, raw_data: raw_data)
end end
before do
stub_feature_flags(ci_enable_live_trace: true)
end
describe 'CHUNK_SIZE' do describe 'CHUNK_SIZE' do
it 'Chunk size can not be changed without special care' do it 'Chunk size can not be changed without special care' do
expect(described_class::CHUNK_SIZE).to eq(128.kilobytes) expect(described_class::CHUNK_SIZE).to eq(128.kilobytes)
...@@ -71,7 +75,7 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do ...@@ -71,7 +75,7 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do
let(:value) { 'a' * described_class::CHUNK_SIZE } let(:value) { 'a' * described_class::CHUNK_SIZE }
it 'schedules stashing data' do it 'schedules stashing data' do
expect(BuildTraceSwapChunkWorker).to receive(:perform_async).once expect(BuildTraceChunkFlushToDBWorker).to receive(:perform_async).once
subject subject
end end
...@@ -108,7 +112,7 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do ...@@ -108,7 +112,7 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do
context 'when fullfilled chunk size' do context 'when fullfilled chunk size' do
it 'does not schedule stashing data' do it 'does not schedule stashing data' do
expect(BuildTraceSwapChunkWorker).not_to receive(:perform_async) expect(BuildTraceChunkFlushToDBWorker).not_to receive(:perform_async)
subject subject
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment