From a22611115a99f74812dab8e1988bd5b0bda3f75d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 29 Nov 2021 15:13:12 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- lib/gitlab/ci/pipeline/logger.rb | 8 ++++---- spec/lib/gitlab/ci/pipeline/logger_spec.rb | 8 ++++---- .../ci/create_pipeline_service/logger_spec.rb | 16 ++++++++-------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/gitlab/ci/pipeline/logger.rb b/lib/gitlab/ci/pipeline/logger.rb index a3e7dda9be5..f677b2f70d0 100644 --- a/lib/gitlab/ci/pipeline/logger.rb +++ b/lib/gitlab/ci/pipeline/logger.rb @@ -47,12 +47,12 @@ module Gitlab return unless log? attributes = { - caller: caller, + pipeline_creation_caller: caller, project_id: project.id, pipeline_id: pipeline.id, - persisted: pipeline.persisted?, - source: pipeline.source, - duration_s: age + pipeline_persisted: pipeline.persisted?, + pipeline_source: pipeline.source, + pipeline_creation_service_duration_s: age }.stringify_keys.merge(observations_hash) destination.info(attributes) diff --git a/spec/lib/gitlab/ci/pipeline/logger_spec.rb b/spec/lib/gitlab/ci/pipeline/logger_spec.rb index 1a6f449c255..eb72413ebd8 100644 --- a/spec/lib/gitlab/ci/pipeline/logger_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/logger_spec.rb @@ -72,11 +72,11 @@ RSpec.describe ::Gitlab::Ci::Pipeline::Logger do let(:loggable_data) do { 'pipeline_id' => pipeline.id, - 'persisted' => true, + 'pipeline_persisted' => true, 'project_id' => project.id, - 'duration_s' => a_kind_of(Numeric), - 'caller' => 'source', - 'source' => pipeline.source, + 'pipeline_creation_service_duration_s' => a_kind_of(Numeric), + 'pipeline_creation_caller' => 'source', + 'pipeline_source' => pipeline.source, 'pipeline_save_duration_s' => { 'avg' => 60, 'count' => 1, 'max' => 60, 'min' => 60 }, diff --git a/spec/services/ci/create_pipeline_service/logger_spec.rb b/spec/services/ci/create_pipeline_service/logger_spec.rb index 8f0c79b8b8e..dfe0859015d 100644 --- a/spec/services/ci/create_pipeline_service/logger_spec.rb +++ b/spec/services/ci/create_pipeline_service/logger_spec.rb @@ -27,12 +27,12 @@ RSpec.describe Ci::CreatePipelineService do let(:loggable_data) do { - 'caller' => 'Ci::CreatePipelineService', - 'source' => 'push', + 'pipeline_creation_caller' => 'Ci::CreatePipelineService', + 'pipeline_source' => 'push', 'pipeline_id' => a_kind_of(Numeric), - 'persisted' => true, + 'pipeline_persisted' => true, '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_size_count' => counters, 'pipeline_step_gitlab_ci_pipeline_chain_seed_duration_s' => counters @@ -79,12 +79,12 @@ RSpec.describe Ci::CreatePipelineService do context 'when the pipeline is not persisted' do let(:loggable_data) do { - 'caller' => 'Ci::CreatePipelineService', - 'source' => 'push', + 'pipeline_creation_caller' => 'Ci::CreatePipelineService', + 'pipeline_source' => 'push', 'pipeline_id' => nil, - 'persisted' => false, + 'pipeline_persisted' => false, '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 } end