Skip to content

Fix error in seeding issues

Stan Hu requested to merge sh-fix-issues-seeding into master

What does this MR do and why?

!121544 (merged) introduced a regression in seeding issues. Gitlab::Usage::MetricDefinition.paths is an array of paths that need to be globbed, not a an array of filenames. metric_definitions_changed? failed because it attempted to retrieve the modification time of a glob instead of a filename. To fix the error, process the path as a glob first and find the last change from all files.

Relates to gitlab-development-kit#1874 (closed)

How to set up and validate locally

  1. With the latest master, run bundle exec rake db:seed_fu FILTER=09_issues.
  2. It should fail at the end.
  3. Repeat with this branch.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports

Loading