Development seed files

Development seed files are listed under gitlab/db/fixtures/development/ and gitlab/ee/db/fixtures/development/ folders. These files are used to populate the database with records to help verifying if feature functionalities, like charts, are working as expected on local host.

The task rake db:seed_fu can be used to run all development seeds with the exception of the ones under a flag which is usually passed as an environment variable.

The following table summarizes the seeds and tasks that can be used to generate data for features.

FeatureCommandSeed
DevOps AdoptionFILTER=devops_adoption bundle exec rake db:seed_fu31_devops_adoption.rb
Value Streams DashboardFILTER=cycle_analytics SEED_VSA=1 bundle exec rake db:seed_fu17_cycle_analytics.rb
Value Streams Dashboard overview countsFILTER=vsd_overview_counts SEED_VSD_COUNTS=1 bundle exec rake db:seed_fu93_vsd_overview_counts.rb
Value Stream AnalyticsFILTER=customizable_cycle_analytics SEED_CUSTOMIZABLE_CYCLE_ANALYTICS=1 bundle exec rake db:seed_fu30_customizable_cycle_analytics
CI/CD analyticsFILTER=ci_cd_analytics SEED_CI_CD_ANALYTICS=1 bundle exec rake db:seed_fu38_ci_cd_analytics
Contributions Analytics

Productivity Analytics

Code review Analytics

Merge Request Analytics
FILTER=productivity_analytics SEED_PRODUCTIVITY_ANALYTICS=1 bundle exec rake db:seed_fu90_productivity_analytics
Repository AnalyticsFILTER=14_pipelines NEW_PROJECT=1 bundle exec rake db:seed_fu14_pipelines
Issue Analytics

Insights
NEW_PROJECT=1 bin/rake gitlab:seed:insights:issuesinsights Rake task
DORA metricsSEED_DORA=1 FILTER=dora_metrics bundle exec rake db:seed_fu92_dora_metrics
Code Suggestion data in ClickHouseFILTER=ai_usage_stats bundle exec rake db:seed_fu94_ai_usage_stats
GitLab DuoSEED_GITLAB_DUO=1 FILTER=gitlab_duo bundle exec rake db:seed_fu95_gitlab_duo
GitLab Duo: Seed failed CI jobs for Root Cause Analysis (/troubleshoot) evaluationLANGCHAIN_API_KEY=$Key bundle exec rake gitlab:duo_chat:seed:failed_ci_jobsseed_failed_ci_jobs

Seed project and group resources for GitLab Duo

The gitlab:duo:setup setup script will execute the development seed file for GitLab Duo project and group resources. However, if you would like to re-create the resources, you can re-run the seed task using the command:

SEED_GITLAB_DUO=1 FILTER=gitlab_duo bundle exec rake db:seed_fu

GitLab Duo group and project resources are also used by the Central Evaluation Framework for automated GitLab Duo evaluation. Some evaluation datasets refer to group or project resources (for instance, Summarize issue #123 requires a corresponding issue record in PostgreSQL).

Currently, this development seed file and evaluation datasets are managed separately. To ensure that the integration keeps working, this seeder has to create the same group/project resources every time. For example, ID and IID of the inserted PostgreSQL records must be the same every time we run this seeding process.

These fixtures are depended by the following projects:

See this architecture doc for more information.