diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /db/fixtures | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'db/fixtures')
-rw-r--r-- | db/fixtures/development/10_merge_requests.rb | 2 | ||||
-rw-r--r-- | db/fixtures/development/17_cycle_analytics.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/db/fixtures/development/10_merge_requests.rb b/db/fixtures/development/10_merge_requests.rb index 9157045a7fd..8cda3eb51be 100644 --- a/db/fixtures/development/10_merge_requests.rb +++ b/db/fixtures/development/10_merge_requests.rb @@ -19,7 +19,7 @@ Gitlab::Seeder.quiet do target_branch = branches.pop label_ids = project.labels.pluck(:id).sample(3) - label_ids += project.group.labels.sample(3) if project.group + label_ids += project.group.labels.sample(3).pluck(:id) if project.group params = { source_branch: source_branch, diff --git a/db/fixtures/development/17_cycle_analytics.rb b/db/fixtures/development/17_cycle_analytics.rb index f5dc2b558d4..57993061c58 100644 --- a/db/fixtures/development/17_cycle_analytics.rb +++ b/db/fixtures/development/17_cycle_analytics.rb @@ -107,6 +107,10 @@ class Gitlab::Seeder::CycleAnalytics pipeline = FactoryBot.create(:ci_pipeline, :success, project: project) build = FactoryBot.create(:ci_build, pipeline: pipeline, project: project, user: developers.sample) + # Required because seeds run in a transaction and these are now + # created in an `after_commit` hook. + merge_request.ensure_metrics + merge_request.metrics.update!( latest_build_started_at: merge_request.created_at, latest_build_finished_at: within_end_time(merge_request.created_at + TEST_STAGE_MAX_DURATION_IN_HOURS.hours), |