Commit 73d36dfa authored by Kamil Trzciński's avatar Kamil Trzciński

Acknowledge `ci/job_artifact_spec.rb` doing cross-DB security findings

It appears that `Projects::DestroyService` is unable to remove
artifacts with `securtiy_findings` which results in a cross-DB
modification when deleting artifacts.
parent f777f96c
......@@ -10,7 +10,9 @@ module EE
override :destroy_related_records
def destroy_related_records(artifacts)
destroy_security_findings(artifacts)
::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.allow_cross_database_modification_within_transaction(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/346236') do
destroy_security_findings(artifacts)
end
end
override :after_batch_destroy_hook
......
- "./spec/models/ci/job_artifact_spec.rb"
- "./spec/services/ci/retry_build_service_spec.rb"
......@@ -115,16 +115,14 @@ RSpec.shared_examples 'UpdateProjectStatistics' do |with_counter_attribute|
expect(ProjectStatistics)
.not_to receive(:increment_statistic)
project.update!(pending_delete: true)
project.destroy!
expect(Projects::DestroyService.new(project, project.owner).execute).to eq(true)
end
it 'does not schedule a namespace statistics worker' do
expect(Namespaces::ScheduleAggregationWorker)
.not_to receive(:perform_async)
project.update!(pending_delete: true)
project.destroy!
expect(Projects::DestroyService.new(project, project.owner).execute).to eq(true)
end
end
end
......
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