Skip to content

Enable QueryLimiting for sidekiq in development

Thong Kuah requested to merge enable_query_limiting_sidekiq_development into master

What does this MR do and why?

Follow-up from !154254 (merged)

Enable QueryLimiting for sidekiq in development

To make this consistent with Controller middleware, we enable QueryLimiting for sidekiq in development. Note that currently, QueryLimiting only raises an exception in test environment.

Also note, that QueryLimiting middlewares are not inserted in production currently.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Comment out Gitlab::QueryLimiting.disable! line in app/workers/ci/create_downstream_pipeline_worker.rb
  2. Run the spec bundle exec spec/services/ci/create_pipeline_service/cross_project_pipeline_spec.rb. You should see the expected Too many SQL queries were executed in Ci::CreateDownstreamPipelineWorker exception.
Edited by Thong Kuah

Merge request reports

Loading