diff options
Diffstat (limited to 'app/services/ci')
9 files changed, 10 insertions, 10 deletions
diff --git a/app/services/ci/archive_trace_service.rb b/app/services/ci/archive_trace_service.rb index 9b2c7788897..bc3219fbd79 100644 --- a/app/services/ci/archive_trace_service.rb +++ b/app/services/ci/archive_trace_service.rb @@ -24,7 +24,7 @@ module Ci end rescue ::Gitlab::Ci::Trace::AlreadyArchivedError # It's already archived, thus we can safely ignore this exception. - rescue => e + rescue StandardError => e # Tracks this error with application logs, Sentry, and Prometheus. # If `archive!` keeps failing for over a week, that could incur data loss. # (See more https://docs.gitlab.com/ee/administration/job_logs.html#new-incremental-logging-architecture) diff --git a/app/services/ci/generate_codequality_mr_diff_report_service.rb b/app/services/ci/generate_codequality_mr_diff_report_service.rb index 3b1bd319a4f..50f5f894ba4 100644 --- a/app/services/ci/generate_codequality_mr_diff_report_service.rb +++ b/app/services/ci/generate_codequality_mr_diff_report_service.rb @@ -14,7 +14,7 @@ module Ci key: key(base_pipeline, head_pipeline), data: head_pipeline.pipeline_artifacts.find_by_file_type(:code_quality_mr_diff).present.for_files(merge_request.new_paths) } - rescue => e + rescue StandardError => e Gitlab::ErrorTracking.track_exception(e, project_id: project.id) { status: :error, diff --git a/app/services/ci/generate_coverage_reports_service.rb b/app/services/ci/generate_coverage_reports_service.rb index 4e6fbc5462a..12b1f19f4b5 100644 --- a/app/services/ci/generate_coverage_reports_service.rb +++ b/app/services/ci/generate_coverage_reports_service.rb @@ -14,7 +14,7 @@ module Ci key: key(base_pipeline, head_pipeline), data: head_pipeline.pipeline_artifacts.find_by_file_type(:code_coverage).present.for_files(merge_request.new_paths) } - rescue => e + rescue StandardError => e Gitlab::ErrorTracking.track_exception( e, project_id: project.id, diff --git a/app/services/ci/generate_exposed_artifacts_report_service.rb b/app/services/ci/generate_exposed_artifacts_report_service.rb index 1dbcd192279..dfa7cbd7d98 100644 --- a/app/services/ci/generate_exposed_artifacts_report_service.rb +++ b/app/services/ci/generate_exposed_artifacts_report_service.rb @@ -14,7 +14,7 @@ module Ci key: key(base_pipeline, head_pipeline), data: data } - rescue => e + rescue StandardError => e Gitlab::ErrorTracking.track_exception(e, project_id: project.id) { status: :error, diff --git a/app/services/ci/generate_terraform_reports_service.rb b/app/services/ci/generate_terraform_reports_service.rb index d768ce777d4..0ffb2d7e34a 100644 --- a/app/services/ci/generate_terraform_reports_service.rb +++ b/app/services/ci/generate_terraform_reports_service.rb @@ -13,7 +13,7 @@ module Ci key: key(base_pipeline, head_pipeline), data: head_pipeline.terraform_reports.plans } - rescue => e + rescue StandardError => e Gitlab::ErrorTracking.track_exception(e, project_id: project.id) { status: :error, diff --git a/app/services/ci/job_artifacts/create_service.rb b/app/services/ci/job_artifacts/create_service.rb index 65752e56c64..a22ac87f660 100644 --- a/app/services/ci/job_artifacts/create_service.rb +++ b/app/services/ci/job_artifacts/create_service.rb @@ -136,7 +136,7 @@ module Ci rescue *OBJECT_STORAGE_ERRORS => error track_exception(error, params) error(error.message, :service_unavailable) - rescue => error + rescue StandardError => error track_exception(error, params) error(error.message, :bad_request) end diff --git a/app/services/ci/prepare_build_service.rb b/app/services/ci/prepare_build_service.rb index 3f87c711270..ec61c43cce9 100644 --- a/app/services/ci/prepare_build_service.rb +++ b/app/services/ci/prepare_build_service.rb @@ -12,7 +12,7 @@ module Ci prerequisites.each(&:complete!) build.enqueue_preparing! - rescue => e + rescue StandardError => e Gitlab::ErrorTracking.track_exception(e, build_id: build.id) build.drop(:unmet_prerequisites) diff --git a/app/services/ci/register_job_service.rb b/app/services/ci/register_job_service.rb index 90341b26fd6..ab5aac55515 100644 --- a/app/services/ci/register_job_service.rb +++ b/app/services/ci/register_job_service.rb @@ -169,7 +169,7 @@ module Ci @metrics.increment_queue_operation(:build_conflict_transition) Result.new(nil, nil, false) - rescue => ex + rescue StandardError => ex @metrics.increment_queue_operation(:build_conflict_exception) # If an error (e.g. GRPC::DeadlineExceeded) occurred constructing @@ -233,7 +233,7 @@ module Ci Gitlab::OptimisticLocking.retry_lock(build, 3, name: 'register_job_scheduler_failure') do |subject| subject.drop!(:scheduler_failure) end - rescue => ex + rescue StandardError => ex build.doom! # This requires extra exception, otherwise we would loose information diff --git a/app/services/ci/stop_environments_service.rb b/app/services/ci/stop_environments_service.rb index 8c9ba849d2e..7c9fc44e7f4 100644 --- a/app/services/ci/stop_environments_service.rb +++ b/app/services/ci/stop_environments_service.rb @@ -27,7 +27,7 @@ module Ci stop_actions.each do |stop_action| stop_action.play(stop_action.user) - rescue => e + rescue StandardError => e Gitlab::ErrorTracking.track_exception(e, deployable_id: stop_action.id) end end |