Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
40fa5ae7
Commit
40fa5ae7
authored
May 02, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'live-trace-v2' into live-trace-v2-efficient-destroy-all
parents
9e65dc53
950df8ba
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
app/models/ci/build_trace_chunk.rb
app/models/ci/build_trace_chunk.rb
+1
-1
app/workers/all_queues.yml
app/workers/all_queues.yml
+1
-1
app/workers/build_trace_chunk_flush_to_db_worker.rb
app/workers/build_trace_chunk_flush_to_db_worker.rb
+1
-1
spec/models/ci/build_trace_chunk_spec.rb
spec/models/ci/build_trace_chunk_spec.rb
+6
-2
No files found.
app/models/ci/build_trace_chunk.rb
View file @
40fa5ae7
...
@@ -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?
BuildTrace
SwapChunk
Worker
.
perform_async
(
id
)
BuildTrace
ChunkFlushToDB
Worker
.
perform_async
(
id
)
end
end
def
fullfilled?
def
fullfilled?
...
...
app/workers/all_queues.yml
View file @
40fa5ae7
...
@@ -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
...
...
app/workers/build_trace_
swap_chunk
_worker.rb
→
app/workers/build_trace_
chunk_flush_to_db
_worker.rb
View file @
40fa5ae7
class
BuildTrace
SwapChunk
Worker
class
BuildTrace
ChunkFlushToDB
Worker
include
ApplicationWorker
include
ApplicationWorker
include
PipelineQueue
include
PipelineQueue
...
...
spec/models/ci/build_trace_chunk_spec.rb
View file @
40fa5ae7
...
@@ -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
(
BuildTrace
SwapChunk
Worker
).
to
receive
(
:perform_async
).
once
expect
(
BuildTrace
ChunkFlushToDB
Worker
).
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
(
BuildTrace
SwapChunk
Worker
).
not_to
receive
(
:perform_async
)
expect
(
BuildTrace
ChunkFlushToDB
Worker
).
not_to
receive
(
:perform_async
)
subject
subject
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment