Skip to content
Snippets Groups Projects
Commit 1244df89 authored by Lee Tickett's avatar Lee Tickett
Browse files

Skip transaction check in triage ops seed

One of our seed scripts creates a personal_access_token but
errors out because of issues with hooks inside of transactions.

This MR wraps the seed in Sidekiq::Worker.skipping_transaction_check
to prevent the error.
parent bbc453f2
No related branches found
No related tags found
2 merge requests!91679Log Search API search timings to determine service levels,!91556Fix 33_triage_ops database seed
......@@ -11,29 +11,31 @@ def seed!
puts "Updating settings to allow web hooks to localhost"
ApplicationSetting.current_without_cache.update!(allow_local_requests_from_web_hooks_and_services: true)
Sidekiq::Testing.inline! do
puts "Ensuring required groups"
ensure_group('gitlab-com')
ensure_group('gitlab-com/gl-security/appsec')
ensure_group('gitlab-jh/jh-team')
ensure_group('gitlab-org')
ensure_group('gitlab-org/gitlab-core-team/community-members')
ensure_group('gitlab-org/security')
puts "Ensuring required projects"
ensure_project('gitlab-org/gitlab')
ensure_project('gitlab-org/security/gitlab')
puts "Ensuring required bot user"
ensure_bot_user
puts "Setting up webhooks"
ensure_webhook_for('gitlab-com')
ensure_webhook_for('gitlab-org')
puts "Ensuring work type labels"
ensure_work_type_labels_for('gitlab-com')
ensure_work_type_labels_for('gitlab-org')
Sidekiq::Worker.skipping_transaction_check do
Sidekiq::Testing.inline! do
puts "Ensuring required groups"
ensure_group('gitlab-com')
ensure_group('gitlab-com/gl-security/appsec')
ensure_group('gitlab-jh/jh-team')
ensure_group('gitlab-org')
ensure_group('gitlab-org/gitlab-core-team/community-members')
ensure_group('gitlab-org/security')
puts "Ensuring required projects"
ensure_project('gitlab-org/gitlab')
ensure_project('gitlab-org/security/gitlab')
puts "Ensuring required bot user"
ensure_bot_user
puts "Setting up webhooks"
ensure_webhook_for('gitlab-com')
ensure_webhook_for('gitlab-org')
puts "Ensuring work type labels"
ensure_work_type_labels_for('gitlab-com')
ensure_work_type_labels_for('gitlab-org')
end
end
end
......
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