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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
4a9d93ba
Commit
4a9d93ba
authored
Nov 25, 2021
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename other keys from the pipeline logger
parent
86798c35
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
lib/gitlab/ci/pipeline/logger.rb
lib/gitlab/ci/pipeline/logger.rb
+3
-3
spec/lib/gitlab/ci/pipeline/logger_spec.rb
spec/lib/gitlab/ci/pipeline/logger_spec.rb
+3
-3
spec/services/ci/create_pipeline_service/logger_spec.rb
spec/services/ci/create_pipeline_service/logger_spec.rb
+6
-6
No files found.
lib/gitlab/ci/pipeline/logger.rb
View file @
4a9d93ba
...
@@ -47,12 +47,12 @@ module Gitlab
...
@@ -47,12 +47,12 @@ module Gitlab
return
unless
log?
return
unless
log?
attributes
=
{
attributes
=
{
caller:
caller
,
pipeline_creation_
caller:
caller
,
project_id:
project
.
id
,
project_id:
project
.
id
,
pipeline_id:
pipeline
.
id
,
pipeline_id:
pipeline
.
id
,
persisted:
pipeline
.
persisted?
,
p
ipeline_p
ersisted:
pipeline
.
persisted?
,
pipeline_source:
pipeline
.
source
,
pipeline_source:
pipeline
.
source
,
duration_s:
age
pipeline_creation_service_
duration_s:
age
}.
stringify_keys
.
merge
(
observations_hash
)
}.
stringify_keys
.
merge
(
observations_hash
)
destination
.
info
(
attributes
)
destination
.
info
(
attributes
)
...
...
spec/lib/gitlab/ci/pipeline/logger_spec.rb
View file @
4a9d93ba
...
@@ -72,10 +72,10 @@ RSpec.describe ::Gitlab::Ci::Pipeline::Logger do
...
@@ -72,10 +72,10 @@ RSpec.describe ::Gitlab::Ci::Pipeline::Logger do
let
(
:loggable_data
)
do
let
(
:loggable_data
)
do
{
{
'pipeline_id'
=>
pipeline
.
id
,
'pipeline_id'
=>
pipeline
.
id
,
'persisted'
=>
true
,
'p
ipeline_p
ersisted'
=>
true
,
'project_id'
=>
project
.
id
,
'project_id'
=>
project
.
id
,
'duration_s'
=>
a_kind_of
(
Numeric
),
'
pipeline_creation_service_
duration_s'
=>
a_kind_of
(
Numeric
),
'caller'
=>
'source'
,
'
pipeline_creation_
caller'
=>
'source'
,
'pipeline_source'
=>
pipeline
.
source
,
'pipeline_source'
=>
pipeline
.
source
,
'pipeline_save_duration_s'
=>
{
'pipeline_save_duration_s'
=>
{
'avg'
=>
60
,
'count'
=>
1
,
'max'
=>
60
,
'min'
=>
60
'avg'
=>
60
,
'count'
=>
1
,
'max'
=>
60
,
'min'
=>
60
...
...
spec/services/ci/create_pipeline_service/logger_spec.rb
View file @
4a9d93ba
...
@@ -27,12 +27,12 @@ RSpec.describe Ci::CreatePipelineService do
...
@@ -27,12 +27,12 @@ RSpec.describe Ci::CreatePipelineService do
let
(
:loggable_data
)
do
let
(
:loggable_data
)
do
{
{
'caller'
=>
'Ci::CreatePipelineService'
,
'
pipeline_creation_
caller'
=>
'Ci::CreatePipelineService'
,
'pipeline_source'
=>
'push'
,
'pipeline_source'
=>
'push'
,
'pipeline_id'
=>
a_kind_of
(
Numeric
),
'pipeline_id'
=>
a_kind_of
(
Numeric
),
'persisted'
=>
true
,
'p
ipeline_p
ersisted'
=>
true
,
'project_id'
=>
project
.
id
,
'project_id'
=>
project
.
id
,
'duration_s'
=>
a_kind_of
(
Numeric
),
'
pipeline_creation_service_
duration_s'
=>
a_kind_of
(
Numeric
),
'pipeline_creation_duration_s'
=>
counters
,
'pipeline_creation_duration_s'
=>
counters
,
'pipeline_size_count'
=>
counters
,
'pipeline_size_count'
=>
counters
,
'pipeline_step_gitlab_ci_pipeline_chain_seed_duration_s'
=>
counters
'pipeline_step_gitlab_ci_pipeline_chain_seed_duration_s'
=>
counters
...
@@ -79,12 +79,12 @@ RSpec.describe Ci::CreatePipelineService do
...
@@ -79,12 +79,12 @@ RSpec.describe Ci::CreatePipelineService do
context
'when the pipeline is not persisted'
do
context
'when the pipeline is not persisted'
do
let
(
:loggable_data
)
do
let
(
:loggable_data
)
do
{
{
'caller'
=>
'Ci::CreatePipelineService'
,
'
pipeline_creation_
caller'
=>
'Ci::CreatePipelineService'
,
'pipeline_source'
=>
'push'
,
'pipeline_source'
=>
'push'
,
'pipeline_id'
=>
nil
,
'pipeline_id'
=>
nil
,
'persisted'
=>
false
,
'p
ipeline_p
ersisted'
=>
false
,
'project_id'
=>
project
.
id
,
'project_id'
=>
project
.
id
,
'duration_s'
=>
a_kind_of
(
Numeric
),
'
pipeline_creation_service_
duration_s'
=>
a_kind_of
(
Numeric
),
'pipeline_step_gitlab_ci_pipeline_chain_seed_duration_s'
=>
counters
'pipeline_step_gitlab_ci_pipeline_chain_seed_duration_s'
=>
counters
}
}
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