Skip to content
Snippets Groups Projects

Fix 33_triage_ops database seed

Merged Lee Tickett requested to merge add-pat-create-service-no-email-param into master
All threads resolved!
1 file
+ 25
23
Compare changes
  • Side-by-side
  • Inline
  • 1244df89
    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.
@@ -11,29 +11,31 @@ def seed!
@@ -11,29 +11,31 @@ def seed!
puts "Updating settings to allow web hooks to localhost"
puts "Updating settings to allow web hooks to localhost"
ApplicationSetting.current_without_cache.update!(allow_local_requests_from_web_hooks_and_services: true)
ApplicationSetting.current_without_cache.update!(allow_local_requests_from_web_hooks_and_services: true)
Sidekiq::Testing.inline! do
Sidekiq::Worker.skipping_transaction_check do
puts "Ensuring required groups"
Sidekiq::Testing.inline! do
ensure_group('gitlab-com')
puts "Ensuring required groups"
ensure_group('gitlab-com/gl-security/appsec')
ensure_group('gitlab-com')
ensure_group('gitlab-jh/jh-team')
ensure_group('gitlab-com/gl-security/appsec')
ensure_group('gitlab-org')
ensure_group('gitlab-jh/jh-team')
ensure_group('gitlab-org/gitlab-core-team/community-members')
ensure_group('gitlab-org')
ensure_group('gitlab-org/security')
ensure_group('gitlab-org/gitlab-core-team/community-members')
ensure_group('gitlab-org/security')
puts "Ensuring required projects"
ensure_project('gitlab-org/gitlab')
puts "Ensuring required projects"
ensure_project('gitlab-org/security/gitlab')
ensure_project('gitlab-org/gitlab')
ensure_project('gitlab-org/security/gitlab')
puts "Ensuring required bot user"
ensure_bot_user
puts "Ensuring required bot user"
ensure_bot_user
puts "Setting up webhooks"
ensure_webhook_for('gitlab-com')
puts "Setting up webhooks"
ensure_webhook_for('gitlab-org')
ensure_webhook_for('gitlab-com')
ensure_webhook_for('gitlab-org')
puts "Ensuring work type labels"
ensure_work_type_labels_for('gitlab-com')
puts "Ensuring work type labels"
ensure_work_type_labels_for('gitlab-org')
ensure_work_type_labels_for('gitlab-com')
 
ensure_work_type_labels_for('gitlab-org')
 
end
end
end
end
end
Loading