Commit 65e9ffd6 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'change_namespace_service_raise_for_dev' into 'master'

Raise an error in dev/test for this StandardError

See merge request gitlab-org/gitlab!74660
parents 54afc25c cd37c481
...@@ -13,7 +13,7 @@ module Ci ...@@ -13,7 +13,7 @@ module Ci
reset_ci_minutes_cache! reset_ci_minutes_cache!
update_pending_builds! update_pending_builds!
rescue StandardError => e rescue StandardError => e
::Gitlab::ErrorTracking.track_exception( ::Gitlab::ErrorTracking.track_and_raise_for_dev_exception(
e, e,
root_namespace_id: @root_namespace.id root_namespace_id: @root_namespace.id
) )
...@@ -30,8 +30,10 @@ module Ci ...@@ -30,8 +30,10 @@ module Ci
minutes_exceeded = @root_namespace.ci_minutes_quota.minutes_used_up? minutes_exceeded = @root_namespace.ci_minutes_quota.minutes_used_up?
all_namespaces = @root_namespace.self_and_descendant_ids all_namespaces = @root_namespace.self_and_descendant_ids
::Gitlab::Database.allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/345867') do
::Ci::PendingBuild.where(namespace: all_namespaces).update_all(minutes_exceeded: minutes_exceeded) ::Ci::PendingBuild.where(namespace: all_namespaces).update_all(minutes_exceeded: minutes_exceeded)
end end
end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
end end
end end
......
- "./ee/spec/requests/api/ci/minutes_spec.rb"
- "./ee/spec/services/ci/minutes/additional_packs/change_namespace_service_spec.rb"
- "./ee/spec/services/ci/minutes/additional_packs/create_service_spec.rb"
- "./ee/spec/services/ci/minutes/refresh_cached_data_service_spec.rb"
- "./spec/features/projects/infrastructure_registry_spec.rb"
- "./spec/lib/gitlab/background_migration/copy_ci_builds_columns_to_security_scans_spec.rb" - "./spec/lib/gitlab/background_migration/copy_ci_builds_columns_to_security_scans_spec.rb"
- "./spec/lib/gitlab/background_migration/migrate_pages_metadata_spec.rb" - "./spec/lib/gitlab/background_migration/migrate_pages_metadata_spec.rb"
- "./spec/migrations/20210907211557_finalize_ci_builds_bigint_conversion_spec.rb" - "./spec/migrations/20210907211557_finalize_ci_builds_bigint_conversion_spec.rb"
......
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