gitlab-org--gitlab-foss/config
Stan Hu 5416ab8a0d Merge branch '21170-cycle-analytics' into 'master'
Cycle Analytics: first iteration

## What does this MR do?

- Implement the first iteration of the "Cycle Analytics" feature.

## What are the relevant issue numbers?

- Closes #21170 

## Screenshots

![cycle_analytics_screencast.gif](/uploads/d23c3c912caa6935fd47b53ca3a56b97/cycle_analytics.gif)

## Backend Tasks

- [x]  Implementation
    - [x]  Phases
        - [x]  Issue (Tracker)
        - [x]  Plan (Board)
        - [x]  Code (IDE)
        - [x]  Test (CI)
        - [x]  Review (MR)
        - [x]  Staging (CD)
        - [x]  Production (Total)
    - [x]  Make heuristics more modular
    - [x]  Scope to project
    - [x]  Date range (30 days, 90 days)
    - [x]  Access restriction
- [x]  Test
    - [x]  Find a better way to test these phases
    - [x]  Phases
        - [x]  Issue (Tracker)
        - [x]  Plan (Board)
        - [x]  Code (IDE)
        - [x]  Test (CI)
        - [x]  Review (MR)
        - [x]  Staging (CD)
        - [x]  Production (Total)
    - [x]  Test for "end case happens before start case"
    - [x]  Consolidate helper
- [x]  Miniboss review
- [x]  Performance testing with mock data
- [x]  Improve performance
    - [x]  Pre-calculate "merge requests closing issues
    - [x]  Pre-calculate everything else
- [x]  Test performance against 10k issues
- [x]  Test all pre-calculation code
    - [x]  Ci::Pipeline -> build start/finish
    - [x]  Ci::Pipeline#merge_requests
    - [x]  Issue -> record default metrics after save
    - [x]  MergeRequest -> record default metrics after save
    - [x]  Deployment -> Update "first_deployed_to_production_at" for MR metrics
    - [x]  Git Push -> Update "first commit mention" for issue metrics
    - [x]  Merge request create/update/refresh -> Update "merge requests closing issues"
- [x]  Remove `MergeRequestsClosingIssues` when necessary
- [x]  Changes to unblock Fatih
    - [x]  Add summary data
    - [x]  `stats` should be array
    - [x]  Let `stats` be `null` if all `stats` are null
- [x]  Indexes for "merge requests closing issues"
- [x]  Test summary data
- [x]  Scope everything to project
    - [x]  Find out why tests were passing
- [x]  Filter should include issues/MRs which have made it to production within the range
- [x]  Don't create duplicate `MergeRequestsClosingIssues`
- [x]  Fix tests
- [x]  MySQL median
- [x]  Assign to Douwe for review
- [x]  Fix conflicts
- [x]  Implement suggestions from Yorick's review
    - [x]  Test on PG
    - [x]  Test on MySQL
- [x]  Refactor
    - [x]  Cleanup
        - [x]  What happens if we have no data at all?
        - [x]  Extract common queries to methods / scopes
    - [x]  Remove unused queries
    - [x]  Downtime for foreign key migrations
    - [x]  Find a way around "if issue.metrics.present?" all over the place
    - [x]  Find a way around "if merge_request.metrics.present?" all over the place
    - [x]  Test migrations on a fresh database
        - [x]  MySQL
        - [x]  Pg
- [x]  Access issues
    - While the project is public and the visibility is set to "Everyone with access", you cannot visit the cycle analytics page when signed out.
- [x]  CHANGELOG
- [x]  Implement suggestions from Douwe's review
    - [x]  First set of comments
    - [x]  Second set of comments
    - [x]  Third set of comments
    - [x]  Fourth set of comments
- [x]  Make sure build is green
- [ ]  Make issue for "polish"
- [ ]  EE MR


See merge request !5986
2016-09-21 05:05:02 +00:00
..
environments Remove quiet_assets in favor of built-in sprockets-rails config. 2016-06-30 16:18:05 -06:00
initializers Gitlab::Checks is now instrumented 2016-09-13 11:58:08 +02:00
locales Minor fixes after a final look at the diff. 2016-05-11 10:30:47 +05:30
application.rb Use a ConnectionPool for Rails.cache on Sidekiq servers 2016-09-20 12:36:23 +02:00
aws.yml.example Add a note that changing example configuration files requires changing omnibus-gitlab. 2015-06-11 15:11:37 +02:00
boot.rb Enable the Rubocop DeprecatedClassMethods cop 2016-05-08 15:33:34 -06:00
database.yml.env Improving the "Environment variables" administration doc 2016-02-01 19:10:46 +01:00
database.yml.mysql set the collation to utf8_general_ci 2014-08-13 14:45:23 +01:00
database.yml.postgresql Remove 'socket' example PostgreSQL parameter 2014-07-01 18:27:50 +02:00
dependency_decisions.yml Whitelist 'Simplified BSD' license 2016-07-26 15:25:15 -06:00
environment.rb Rails update to 4.2.4 2015-11-25 18:18:44 +02:00
gitlab.yml.example Update default path for repository_downloads_path in gitlab.yml.example 2016-07-21 10:31:49 -03:00
license_finder.yml Resolve feedback. 2016-06-06 13:39:36 -06:00
mail_room.yml Synced mail_room.yml with the one in omnibus 2016-08-04 18:55:37 +02:00
newrelic.yml Revert "Remove newrelic gem. Closes #12860" 2016-02-23 07:25:37 -08:00
resque.yml.example Added Redis Sentinel support documentation 2016-08-04 18:55:37 +02:00
routes.rb Implement (some) comments from @DouweM's review. 2016-09-20 18:13:11 +05:30
secrets.yml.example Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00
sidekiq.yml.example bug found by Charles Sibbald at Sky . Calls with patricio and Jacob confirmed this 2016-02-18 18:58:51 +00:00
unicorn.rb.example Fix typos and grammar 2016-02-10 12:43:19 +02:00
unicorn.rb.example.development Increase unicorn timeout to 60 seconds 2014-09-23 17:11:16 +03:00