Allow nesting Query Analyzers
In some circumstances we should allow to nest Query Analyzers. However, we should only initialize new ones within the block.
The usage pattern for which it is needed:
- We use default analyzers in regular execution (
spec/support/database/query_analyzer.rb
) - We register a single purpose analyzer within a block of execution (testing of background migrations via
lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb
)
Related #358430 (closed)
Edited by Kamil Trzciński (Back 2025-01-01)