Commit d994607e authored by Thong Kuah's avatar Thong Kuah Committed by Kamil Trzciński

Allowlist cross-db modification instances

- This was modifying external_pull_requests table within a Project
transaction

- This was modifying the ci_pipelines table within
ApplicationRecord.transaction.
parent 87616fca
......@@ -32,9 +32,11 @@ module Security
end
def execute
::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.allow_cross_database_modification_within_transaction(url: 'URL TODO') do
ApplicationRecord.transaction do
TASKS.each { |task| execute_task(task) }
end
end
@finding_maps.map(&:vulnerability_id)
end
......
......@@ -14,10 +14,12 @@ module Gitlab
# It also adds some logic around Group Labels/Milestones for edge cases.
class ObjectBuilder < Base::ObjectBuilder
def self.build(*args)
::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.allow_cross_database_modification_within_transaction(url: 'URL TODO') do
::Project.transaction do
super
end
end
end
def initialize(klass, attributes)
super
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment