Too many SQL queries were executed in Admin::ApplicationSettingsController#usage_data
Triggered by rspec ./spec/features/admin/admin_settings_spec.rb:324
Example https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/229121980.
Failures:
1) Admin updates settings Metrics and profiling page loads usage ping payload on click
Got 0 failures and 2 other errors:
1.1) Failure/Error: raise(error) if raise_error?
Gitlab::QueryLimiting::Transaction::ThresholdExceededError:
Too many SQL queries were executed in Admin::ApplicationSettingsController#usage_data: a maximum of 100 is allowed but 102 SQL queries were executed
# ./lib/gitlab/query_limiting/transaction.rb:56:in `act_upon_results'
# ./lib/gitlab/query_limiting/middleware.rb:21:in `call'
# ./ee/lib/gitlab/jira/middleware.rb:17:in `call'
# ./lib/gitlab/middleware/go.rb:20:in `call'
# ./lib/gitlab/etag_caching/middleware.rb:13:in `call'
# ./lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
# ./vendor/ruby/2.6.0/gems/gitlab-labkit-0.2.0/lib/labkit/correlation/correlation_id.rb:18:in `use_id'
# ./lib/gitlab/middleware/correlation_id.rb:15:in `call'
# ./vendor/ruby/2.6.0/gems/batch-loader-1.4.0/lib/batch_loader/middleware.rb:11:in `call'
# ./vendor/ruby/2.6.0/gems/apollo_upload_server-2.0.0.beta.3/lib/apollo_upload_server/middleware.rb:20:in `call'
# ./vendor/ruby/2.6.0/gems/rack-attack-4.4.1/lib/rack/attack.rb:107:in `call'
# ./vendor/ruby/2.6.0/gems/warden-1.2.7/lib/warden/manager.rb:36:in `block in call'
# ./vendor/ruby/2.6.0/gems/warden-1.2.7/lib/warden/manager.rb:35:in `catch'
# ./vendor/ruby/2.6.0/gems/warden-1.2.7/lib/warden/manager.rb:35:in `call'
# ./vendor/ruby/2.6.0/gems/rack-cors-1.0.2/lib/rack/cors.rb:97:in `call'
# ./vendor/ruby/2.6.0/gems/rack-2.0.7/lib/rack/etag.rb:25:in `call'
# ./vendor/ruby/2.6.0/gems/rack-2.0.7/lib/rack/conditional_get.rb:25:in `call'
# ./vendor/ruby/2.6.0/gems/rack-2.0.7/lib/rack/head.rb:12:in `call'
# ./lib/gitlab/middleware/read_only/controller.rb:42:in `call'
# ./lib/gitlab/middleware/read_only.rb:18:in `call'
# ./vendor/ruby/2.6.0/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:232:in `context'
# ./vendor/ruby/2.6.0/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:226:in `call'
# ./vendor/ruby/2.6.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/cookies.rb:613:in `call'
# ./vendor/ruby/2.6.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
# ./vendor/ruby/2.6.0/gems/activesupport-5.1.7/lib/active_support/callbacks.rb:97:in `run_callbacks'
# ./vendor/ruby/2.6.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/callbacks.rb:24:in `call'
# ./vendor/ruby/2.6.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
# ./vendor/ruby/2.6.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
# ./lib/gitlab/middleware/basic_health_check.rb:25:in `call'
# ./vendor/ruby/2.6.0/gems/railties-5.1.7/lib/rails/rack/logger.rb:36:in `call_app'
# ./vendor/ruby/2.6.0/gems/railties-5.1.7/lib/rails/rack/logger.rb:24:in `block in call'
# ./vendor/ruby/2.6.0/gems/activesupport-5.1.7/lib/active_support/tagged_logging.rb:69:in `block in tagged'
# ./vendor/ruby/2.6.0/gems/activesupport-5.1.7/lib/active_support/tagged_logging.rb:26:in `tagged'
# ./vendor/ruby/2.6.0/gems/activesupport-5.1.7/lib/active_support/tagged_logging.rb:69:in `tagged'
# ./vendor/ruby/2.6.0/gems/railties-5.1.7/lib/rails/rack/logger.rb:24:in `call'
# ./vendor/ruby/2.6.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
# ./lib/gitlab/request_context.rb:26:in `call'
# ./vendor/ruby/2.6.0/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call'
# ./vendor/ruby/2.6.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/request_id.rb:25:in `call'
# ./vendor/ruby/2.6.0/gems/rack-2.0.7/lib/rack/method_override.rb:22:in `call'
# ./vendor/ruby/2.6.0/gems/rack-2.0.7/lib/rack/runtime.rb:22:in `call'
# ./config/initializers/fix_local_cache_middleware.rb:9:in `call'
# ./vendor/ruby/2.6.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/executor.rb:12:in `call'
# ./vendor/ruby/2.6.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/static.rb:125:in `call'
# ./lib/gitlab/middleware/static.rb:11:in `call'
# ./lib/gitlab/testing/request_inspector_middleware.rb:33:in `call'
# ./lib/gitlab/testing/request_blocker_middleware.rb:47:in `call'
# ./vendor/ruby/2.6.0/gems/rack-2.0.7/lib/rack/sendfile.rb:111:in `call'
# ./lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call'
# ./vendor/ruby/2.6.0/gems/sentry-raven-2.9.0/lib/raven/integrations/rack.rb:51:in `call'
# ./vendor/ruby/2.6.0/gems/railties-5.1.7/lib/rails/engine.rb:522:in `call'
# ./vendor/ruby/2.6.0/gems/rack-2.0.7/lib/rack/urlmap.rb:68:in `block in call'
# ./vendor/ruby/2.6.0/gems/rack-2.0.7/lib/rack/urlmap.rb:53:in `each'
# ./vendor/ruby/2.6.0/gems/rack-2.0.7/lib/rack/urlmap.rb:53:in `call'
# ./vendor/ruby/2.6.0/gems/capybara-2.18.0/lib/capybara/server.rb:44:in `call'
# ./vendor/ruby/2.6.0/gems/rack-2.0.7/lib/rack/handler/webrick.rb:86:in `service'
# /usr/local/lib/ruby/2.6.0/webrick/httpserver.rb:140:in `service'
# /usr/local/lib/ruby/2.6.0/webrick/httpserver.rb:96:in `run'
# /usr/local/lib/ruby/2.6.0/webrick/server.rb:307:in `block in start_thread'
# ------------------
# --- Caused by: ---
# Capybara::ExpectationNotMet:
# expected to find visible css ".js-usage-ping-payload" but there were no matches. Also found "", which matched the selector but not all filters.
# ./vendor/ruby/2.6.0/gems/capybara-2.18.0/lib/capybara/node/matchers.rb:95:in `block in assert_selector'
1.2) Failure/Error: raise JSConsoleError, message
JSConsoleError:
Unexpected browser console output:
http://127.0.0.1:38425/admin/application_settings/usage_data.html - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
# ./spec/support/capybara.rb:100:in `block (2 levels) in <top (required)>'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:447:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:447:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:357:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:509:in `block in run_owned_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:508:in `each'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:508:in `run_owned_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:595:in `block in run_example_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:594:in `each'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:594:in `run_example_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:465:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:507:in `run_after_example'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:273:in `block in run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:466:in `block in run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:606:in `block in run_around_example_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:342:in `call'
# ./vendor/ruby/2.6.0/gems/rspec-rails-3.7.2/lib/rspec/rails/adapters.rb:127:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:447:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:447:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:375:in `execute_with'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:608:in `block (2 levels) in run_around_example_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:342:in `call'
# ./vendor/ruby/2.6.0/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:123:in `block in run'
# ./vendor/ruby/2.6.0/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:110:in `loop'
# ./vendor/ruby/2.6.0/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:110:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-retry-0.6.1/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
# ./vendor/ruby/2.6.0/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:37:in `block (2 levels) in setup'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:447:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:447:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:375:in `execute_with'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:608:in `block (2 levels) in run_around_example_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:342:in `call'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:609:in `run_around_example_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:466:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:457:in `with_around_example_hooks'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:500:in `with_around_and_singleton_context_hooks'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example.rb:251:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:628:in `block in run_examples'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:624:in `map'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:624:in `run_examples'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:590:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:591:in `block in run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:591:in `map'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/example_group.rb:591:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:118:in `block (3 levels) in run_specs'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:118:in `map'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:118:in `block (2 levels) in run_specs'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/configuration.rb:1926:in `with_suite_hooks'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:113:in `block in run_specs'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/reporter.rb:79:in `report'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:112:in `run_specs'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:87:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:71:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:45:in `invoke'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.7.1/exe/rspec:4:in `<top (required)>'
# ./vendor/ruby/2.6.0/bin/rspec:23:in `load'
# ./vendor/ruby/2.6.0/bin/rspec:23:in `<top (required)>'
# /usr/local/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `load'
# /usr/local/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `kernel_load'
# /usr/local/lib/ruby/2.6.0/bundler/cli/exec.rb:28:in `run'
# /usr/local/lib/ruby/2.6.0/bundler/cli.rb:463:in `exec'
# /usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
# /usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
# /usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
# /usr/local/lib/ruby/2.6.0/bundler/cli.rb:27:in `dispatch'
# /usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
# /usr/local/lib/ruby/2.6.0/bundler/cli.rb:18:in `start'
# /usr/local/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:30:in `block in <top (required)>'
# /usr/local/lib/ruby/2.6.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
# /usr/local/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:22:in `<top (required)>'
# /usr/local/bin/bundle:23:in `load'
# /usr/local/bin/bundle:23:in `<main>'
Finished in 8 minutes 55 seconds (files took 16.33 seconds to load)
158 examples, 1 failure, 3 pending
Failed examples:
rspec ./spec/features/admin/admin_settings_spec.rb:324 # Admin updates settings Metrics and profiling page loads usage ping payload on click