Commit 8eed7cbb authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch '285093-add-jobs-count-field' into 'master'

Add `jobs_count` field to `LimitExceededError`

See merge request gitlab-org/gitlab!69402
parents faecf33d dbf56510
...@@ -39,6 +39,7 @@ module EE ...@@ -39,6 +39,7 @@ module EE
def log_attrs def log_attrs
{ {
jobs_count: pipeline.statuses.count,
pipeline_source: pipeline.source, pipeline_source: pipeline.source,
plan: project.actual_plan_name, plan: project.actual_plan_name,
project_id: project.id, project_id: project.id,
......
...@@ -70,6 +70,7 @@ RSpec.describe ::Gitlab::Ci::Pipeline::Chain::Limit::Size do ...@@ -70,6 +70,7 @@ RSpec.describe ::Gitlab::Ci::Pipeline::Chain::Limit::Size do
it 'logs the error' do it 'logs the error' do
expect(Gitlab::ErrorTracking).to receive(:log_exception).with( expect(Gitlab::ErrorTracking).to receive(:log_exception).with(
instance_of(Gitlab::Ci::Limit::LimitExceededError), instance_of(Gitlab::Ci::Limit::LimitExceededError),
jobs_count: pipeline.statuses.count,
project_id: project.id, plan: namespace.actual_plan_name, project_id: project.id, plan: namespace.actual_plan_name,
project_full_path: project.full_path, pipeline_source: pipeline.source project_full_path: project.full_path, pipeline_source: pipeline.source
) )
...@@ -152,6 +153,7 @@ RSpec.describe ::Gitlab::Ci::Pipeline::Chain::Limit::Size do ...@@ -152,6 +153,7 @@ RSpec.describe ::Gitlab::Ci::Pipeline::Chain::Limit::Size do
it 'logs the pipeline' do it 'logs the pipeline' do
expect(Gitlab::ErrorTracking).to receive(:log_exception).with( expect(Gitlab::ErrorTracking).to receive(:log_exception).with(
instance_of(Gitlab::Ci::Limit::LimitExceededError), instance_of(Gitlab::Ci::Limit::LimitExceededError),
jobs_count: pipeline.statuses.count,
project_id: project.id, plan: namespace.actual_plan_name, project_id: project.id, plan: namespace.actual_plan_name,
project_full_path: project.full_path, pipeline_source: pipeline.source project_full_path: project.full_path, pipeline_source: pipeline.source
) )
......
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