Fix batch_commit_loader_spec.rb failure on jh pipelines
What does this MR do and why?
There are a lot of test failures on the JH side
1) Types::Ci::StatusActionType id field correctly renders the field
Failure/Error: raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
RuntimeError:
no!
# ./spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb:28:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:106:in `block in read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:105:in `read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:54:in `select_all'
# ./app/models/concerns/cache_markdown_field.rb:34:in `banzai_render_context'
# ./lib/banzai/renderer.rb:50:in `cacheless_render_field'
# ./app/models/concerns/cache_markdown_field.rb:53:in `rendered_field_content'
# ./app/models/concerns/cache_markdown_field.rb:62:in `block in refresh_markdown_cache'
# ./app/models/concerns/cache_markdown_field.rb:59:in `to_h'
# ./app/models/concerns/cache_markdown_field.rb:59:in `refresh_markdown_cache'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./app/models/internal_id.rb:171:in `create_record!'
# ./app/models/internal_id.rb:124:in `generate'
# ./app/models/internal_id.rb:38:in `generate_next'
# ./app/models/concerns/atomic_internal_id.rb:85:in `block in define_instance_internal_id_methods'
# ./spec/factories/ci/pipelines.rb:27:in `block (3 levels) in <top (required)>'
# ./spec/graphql/types/ci/status_action_type_spec.rb:25:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/support/flaky_tests.rb:27:in `block (2 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (3 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:60:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (2 levels) in <top (required)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
2) BulkImports::Common::Pipelines::WikiPipeline#run behaves like wiki pipeline imports a wiki for an entity #run when wiki exists imports new wiki into destination project
Failure/Error: raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
RuntimeError:
no!
Shared Example Group: "wiki pipeline imports a wiki for an entity" called from ./spec/lib/bulk_imports/common/pipelines/wiki_pipeline_spec.rb:23
# ./spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb:28:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:106:in `block in read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:105:in `read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:54:in `select_all'
# ./app/models/namespace/traversal_hierarchy.rb:88:in `recursive_root_ancestor'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./spec/lib/bulk_imports/common/pipelines/wiki_pipeline_spec.rb:7:in `block (3 levels) in <top (required)>'
3) BulkImports::Common::Pipelines::WikiPipeline#run behaves like wiki pipeline imports a wiki for an entity #run when wiki does not exist does not import wiki
Failure/Error: raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
RuntimeError:
no!
Shared Example Group: "wiki pipeline imports a wiki for an entity" called from ./spec/lib/bulk_imports/common/pipelines/wiki_pipeline_spec.rb:23
# ./spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb:28:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:106:in `block in read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:105:in `read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:54:in `select_all'
# ./app/models/namespace/traversal_hierarchy.rb:88:in `recursive_root_ancestor'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./spec/lib/bulk_imports/common/pipelines/wiki_pipeline_spec.rb:7:in `block (3 levels) in <top (required)>'
4) Deployments::ArchiveInProjectWorker#perform executes Deployments::ArchiveInProjectService
Failure/Error: raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
RuntimeError:
no!
# ./spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb:28:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:106:in `block in read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:105:in `read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:54:in `select_all'
# ./app/models/namespace/traversal_hierarchy.rb:88:in `recursive_root_ancestor'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./spec/factories/deployments.rb:10:in `block (3 levels) in <top (required)>'
# ./spec/workers/deployments/archive_in_project_worker_spec.rb:9:in `block (3 levels) in <top (required)>'
# ./spec/workers/deployments/archive_in_project_worker_spec.rb:13:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/support/flaky_tests.rb:27:in `block (2 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (3 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:60:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (2 levels) in <top (required)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
5) OauthAccessGrant#delete cascades to oauth_openid_requests
Failure/Error: raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
RuntimeError:
no!
# ./spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb:28:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:106:in `block in read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:105:in `read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:54:in `select_all'
# ./app/models/namespace/traversal_hierarchy.rb:88:in `recursive_root_ancestor'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./spec/models/oauth_access_grant_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/models/oauth_access_grant_spec.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/models/oauth_access_grant_spec.rb:11:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/support/flaky_tests.rb:27:in `block (2 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (3 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:60:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (2 levels) in <top (required)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
6) DisallowTwoFactorForGroupWorker updates group
Failure/Error: raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
RuntimeError:
no!
# ./spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb:28:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:106:in `block in read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:105:in `read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:54:in `select_all'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:95:in `method_missing'
# ./app/models/group.rb:836:in `update_two_factor_requirement'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./spec/workers/disallow_two_factor_for_group_worker_spec.rb:6:in `block (2 levels) in <top (required)>'
7) DisallowTwoFactorForGroupWorker updates group members
Failure/Error: raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
RuntimeError:
no!
# ./spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb:28:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:106:in `block in read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:105:in `read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:54:in `select_all'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:95:in `method_missing'
# ./app/models/group.rb:836:in `update_two_factor_requirement'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./spec/workers/disallow_two_factor_for_group_worker_spec.rb:6:in `block (2 levels) in <top (required)>'
8) Snippets::UpdateRepositoryStorageWorker behaves like an update storage move worker #perform without repository storage move calls the update repository storage service
Failure/Error: raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
RuntimeError:
no!
Shared Example Group: "an update storage move worker" called from ./spec/workers/snippets/update_repository_storage_worker_spec.rb:8
# ./spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb:28:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:106:in `block in read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:105:in `read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:54:in `select_all'
# ./app/models/namespace/traversal_hierarchy.rb:88:in `recursive_root_ancestor'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./spec/workers/snippets/update_repository_storage_worker_spec.rb:9:in `block (3 levels) in <top (required)>'
9) Snippets::UpdateRepositoryStorageWorker behaves like an update storage move worker #perform with repository storage move calls the update repository storage service
Failure/Error: raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
RuntimeError:
no!
Shared Example Group: "an update storage move worker" called from ./spec/workers/snippets/update_repository_storage_worker_spec.rb:8
# ./spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb:28:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:106:in `block in read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:105:in `read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:54:in `select_all'
# ./app/models/namespace/traversal_hierarchy.rb:88:in `recursive_root_ancestor'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./spec/workers/snippets/update_repository_storage_worker_spec.rb:9:in `block (3 levels) in <top (required)>'
10) Gitlab::Auth::Otp::Strategies::FortiAuthenticator successful validation returns success
Failure/Error: raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
RuntimeError:
no!
# ./spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb:28:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:106:in `block in read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:105:in `read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:54:in `select_all'
# ./app/models/namespace/traversal_hierarchy.rb:88:in `recursive_root_ancestor'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./spec/lib/gitlab/auth/otp/strategies/forti_authenticator_spec.rb:6:in `block (2 levels) in <top (required)>'
11) Gitlab::Auth::Otp::Strategies::FortiAuthenticator unsuccessful validation returns error
Failure/Error: raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
RuntimeError:
no!
# ./spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb:28:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:106:in `block in read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:105:in `read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:54:in `select_all'
# ./app/models/namespace/traversal_hierarchy.rb:88:in `recursive_root_ancestor'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./spec/lib/gitlab/auth/otp/strategies/forti_authenticator_spec.rb:6:in `block (2 levels) in <top (required)>'
12) Gitlab::Auth::Otp::Strategies::FortiAuthenticator unexpected error returns error
Failure/Error: raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
RuntimeError:
no!
# ./spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb:28:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:106:in `block in read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:105:in `read_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:54:in `select_all'
# ./app/models/namespace/traversal_hierarchy.rb:88:in `recursive_root_ancestor'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./spec/lib/gitlab/auth/otp/strategies/forti_authenticator_spec.rb:6:in `block (2 levels) in <top (required)>'
I think that's what caused it
#spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb
before do
ActiveSupport::Notifications.subscribe('sql.active_record') do |event|
raise "no!" if event.payload[:sql].include?('SELECT "namespaces".')
end
end
It looks like a global notification has been added that will cause other tests to fail
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Zehua Zhang