Commit cd37c481 authored by Thong Kuah's avatar Thong Kuah

Raise an error in dev/test for this StandardError

It is a timesink to silently debug if there's no exception. For example,
it took a while to work out how CrossJoinAcrossUnsupportedTablesError
(should) be occuring

Now that we get CrossJoinAcrossUnsupportedTablesError, allowlist the
callsite, so that all specs covering this will not fail
parent 4fe975f0
...@@ -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,7 +30,9 @@ module Ci ...@@ -30,7 +30,9 @@ 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
::Ci::PendingBuild.where(namespace: all_namespaces).update_all(minutes_exceeded: minutes_exceeded) ::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)
end
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
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