Skip to content
Snippets Groups Projects
Commit 3e987fc5 authored by GitLab Release Tools Bot's avatar GitLab Release Tools Bot
Browse files

Merge branch 'security-fix-issue-59379-11-10' into '11-10-stable'

Disable Rails SQL query cache when applying service templates

See merge request gitlab/gitlabhq!3181
parents ddd724c9 a1fc251e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -24,7 +24,7 @@ module Projects
 
def propagate_projects_with_template
loop do
batch = project_ids_batch
batch = Project.uncached { project_ids_batch }
 
bulk_create_from_template(batch) unless batch.empty?
 
Loading
Loading
---
title: Disable Rails SQL query cache when applying service templates
merge_request:
author:
type: security
Loading
Loading
@@ -70,7 +70,7 @@ describe Projects::PropagateServiceTemplate do
expect(project.pushover_service.properties).to eq(service_template.properties)
end
 
describe 'bulk update' do
describe 'bulk update', :use_sql_query_cache do
let(:project_total) { 5 }
 
before do
Loading
Loading
Loading
Loading
@@ -213,6 +213,12 @@ RSpec.configure do |config|
ActionController::Base.cache_store = caching_store
end
 
config.around(:each, :use_sql_query_cache) do |example|
ActiveRecord::Base.cache do
example.run
end
end
# The :each scope runs "inside" the example, so this hook ensures the DB is in the
# correct state before any examples' before hooks are called. This prevents a
# problem where `ScheduleIssuesClosedAtTypeChange` (or any migration that depends
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment