Skip to content

Improve productivity analytics seed

Felipe Cardozo requested to merge issue_413265 into master

What does this MR do and why?

Introduces fixes and improvements to productivity analytics seed:

  1. Instead of seeding all projects it now accepts PROJECT_ID or create a new project with a group. Seeding all projects could take a long time as it takes like 20 seconds for each project.
  2. Seeds projects that have legacy master branch or main branch.
  3. Raise the number of created issues/MRs to 10.
  4. Fix commits with changes that were not being created
  5. Fixes Merge Requests that were not getting merged

related to #413265 (closed)

How to set up and validate locally

  1. Execute seed creating a new project FILTER=productivity_analytics SEED_PRODUCTIVITY_ANALYTICS=1 bundle exec rake db:seed_fu
  2. Execute seed for an existing project FILTER=productivity_analytics SEED_PRODUCTIVITY_ANALYTICS=1 PROJECT_ID=10 bundle exec rake db:seed_fu
  3. On both projects check if 10 Issues/MRs got created and if some of the MRs are merged.

It is also worth checking if data has good distribution over time on charts like:

  • Contributions Analytics(Group/Project)
  • Productivity analytics
  • Code review
  • Merge request analytics

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 Felipe Cardozo

Merge request reports

Loading