diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-19 18:09:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-19 18:09:36 +0300 |
commit | 8bb837c4d180720d4d923ef2e7bd2c9a46ca97a0 (patch) | |
tree | 7dcb166661ba29fb6cd5935f0db34eee6c935388 /db/fixtures | |
parent | eef2437c0a359ec3437d31d1b1ea959e54c71458 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/fixtures')
-rw-r--r-- | db/fixtures/development/17_cycle_analytics.rb | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/db/fixtures/development/17_cycle_analytics.rb b/db/fixtures/development/17_cycle_analytics.rb index 6e4872a29e7..5442c6eb00b 100644 --- a/db/fixtures/development/17_cycle_analytics.rb +++ b/db/fixtures/development/17_cycle_analytics.rb @@ -70,30 +70,36 @@ class Gitlab::Seeder::CycleAnalytics # rubocop:disable Style/ClassAndModuleChild return end - create_developers! - create_issues! - - seed_lead_time! - seed_issue_stage! - seed_plan_stage! - seed_code_stage! - seed_test_stage! - seed_review_stage! - seed_staging_stage! - - if Gitlab.ee? - create_vulnerabilities_count_report! - seed_dora_metrics! - create_custom_value_stream! - create_value_stream_aggregation(project.group) - end - - puts "Successfully seeded '#{project.full_path}' for Value Stream Management!" - puts "URL: #{Rails.application.routes.url_helpers.project_url(project)}" + seed_data! end private + def seed_data! + Sidekiq::Worker.skipping_transaction_check do + create_developers! + create_issues! + + seed_lead_time! + seed_issue_stage! + seed_plan_stage! + seed_code_stage! + seed_test_stage! + seed_review_stage! + seed_staging_stage! + + if Gitlab.ee? + create_vulnerabilities_count_report! + seed_dora_metrics! + create_custom_value_stream! + create_value_stream_aggregation(project.group) + end + + puts "Successfully seeded '#{project.full_path}' for Value Stream Management!" + puts "URL: #{Rails.application.routes.url_helpers.project_url(project)}" + end + end + def create_custom_value_stream! [project.project_namespace.reload, project.group].each do |parent| Analytics::CycleAnalytics::ValueStreams::CreateService.new( |