Improve productivity analytics seed
What does this MR do and why?
Introduces fixes and improvements to productivity analytics seed:
- 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. - Seeds projects that have legacy
master
branch ormain
branch. - Raise the number of created issues/MRs to 10.
- Fix commits with changes that were not being created
- Fixes Merge Requests that were not getting merged
related to #413265 (closed)
How to set up and validate locally
- Execute seed creating a new project
FILTER=productivity_analytics SEED_PRODUCTIVITY_ANALYTICS=1 bundle exec rake db:seed_fu
- Execute seed for an existing project
FILTER=productivity_analytics SEED_PRODUCTIVITY_ANALYTICS=1 PROJECT_ID=10 bundle exec rake db:seed_fu
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Felipe Cardozo