Commit 2a4aa16f authored by Thong Kuah's avatar Thong Kuah

Merge branch 'remove-cluster-runner-cross-db-query' into 'master'

Remove cross-db modification exception in Clusters::Applications::Runner

See merge request gitlab-org/gitlab!78236
parents 00894207 dc80afd2
......@@ -41,9 +41,7 @@ module Clusters
end
def prepare_uninstall
::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.allow_cross_database_modification_within_transaction(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/350180') do
runner&.update!(active: false)
end
# No op, see https://gitlab.com/gitlab-org/gitlab/-/issues/350180.
end
def post_uninstall
......
......@@ -101,19 +101,6 @@ RSpec.describe Clusters::Applications::Runner do
end
end
describe '#prepare_uninstall' do
it 'pauses associated runner' do
active_runner = create(:ci_runner, contacted_at: 1.second.ago)
expect(active_runner.active).to be_truthy
application_runner = create(:clusters_applications_runner, :scheduled, runner: active_runner)
application_runner.prepare_uninstall
expect(active_runner.active).to be_falsey
end
end
describe '#make_uninstalling!' do
subject { create(:clusters_applications_runner, :scheduled, runner: ci_runner) }
......
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