Commit e23a5811 authored by Matthias Käppler's avatar Matthias Käppler

Merge branch 'gl_infra_6364' into 'master'

Call UUID overriding logic outside of the transaction

See merge request gitlab-org/gitlab!81018
parents e2088289 1d8d0068
......@@ -21,6 +21,7 @@ module Security
end
def execute
override_finding_uuids! if override_uuids?
set_security_scan_non_latest! if job.retried?
return deduplicate if security_scan.has_errors? || !security_scan.latest? || !security_scan.succeeded?
......@@ -31,12 +32,11 @@ module Security
private
attr_reader :artifact, :known_keys, :deduplicate
delegate :project, :job, to: :artifact, private: true
def security_report
@security_report ||= artifact.security_report.tap do |report|
OverrideUuidsService.execute(report) if override_uuids?
end
delegate :project, :job, :security_report, to: :artifact, private: true
def override_finding_uuids!
OverrideUuidsService.execute(security_report)
end
def override_uuids?
......
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