gitlab-org--gitlab-foss/app/helpers
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
..
appearances_helper.rb Improve performance of MR show page 2016-08-18 19:08:59 -05:00
application_helper.rb fix issues mr counter 2016-09-20 14:39:15 +01:00
application_settings_helper.rb Support integration with Koding (online IDE) 2016-08-19 12:10:58 -07:00
auth_helper.rb
avatars_helper.rb Fix layout issues with blame table 2016-09-06 10:36:09 +01:00
blob_helper.rb Move editor paths to helper 2016-08-19 16:17:14 +01:00
branches_helper.rb
broadcast_messages_helper.rb
button_helper.rb
ci_status_helper.rb Merge branch 'artifacts-from-ref-and-build-name' into 'master' 2016-08-30 18:03:16 +00:00
commits_helper.rb Eliminate unneeded calls to Repository#blob_at when listing commits with no path 2016-08-17 17:07:08 +02:00
compare_helper.rb Project tools visibility level 2016-09-01 11:47:59 -03:00
dashboard_helper.rb
diff_helper.rb Avoid commit lookup on diff_helper 2016-08-10 13:09:07 +02:00
dropdowns_helper.rb
emails_helper.rb
events_helper.rb
explore_helper.rb Enable Style/SpaceAroundEqualsInParameterDefault cop 2016-08-06 04:03:01 +02:00
external_wiki_helper.rb
form_helper.rb
git_helper.rb Improve merge request version feature 2016-09-07 10:24:48 +03:00
gitlab_markdown_helper.rb
gitlab_routing_helper.rb Implement Cycle Analytics frontend. 2016-09-15 00:05:23 +03:00
graph_helper.rb
groups_helper.rb Syntax fixes and better tests for helper methods. Updated docs. 2016-09-15 14:10:49 -05:00
icons_helper.rb
import_helper.rb Don't create groups for unallowed users when importing projects 2016-08-31 12:55:45 -03:00
issuables_helper.rb Completed project filter dropdown, still need to move it from inline to ProjectSelect.js (or different) 2016-09-01 14:35:34 +01:00
issues_helper.rb Award tooltips refer to current user as "You" 2016-08-17 21:25:39 +01:00
javascript_helper.rb
kerberos_spnego_helper.rb
labels_helper.rb
lfs_helper.rb Move logic to check ci? or lfs_deploy_token? to Gitlab::Auth::Result 2016-09-20 11:03:10 +02:00
members_helper.rb Show member roles to all users on members page 2016-08-11 11:08:07 -05:00
merge_requests_helper.rb Improve merge request version feature 2016-09-07 10:24:48 +03:00
milestones_helper.rb
namespaces_helper.rb few fixes based on MR feedback 2016-09-20 10:15:20 +02:00
nav_helper.rb remove dead code - 'collapsed_nav' cookie no longer used since a1fbdbb6 (see MR !4579) 2016-09-07 14:02:21 -05:00
notes_helper.rb Fix note form hint showing slash commands supported for commits 2016-09-20 13:58:14 +02:00
notifications_helper.rb
page_layout_helper.rb
preferences_helper.rb
projects_helper.rb Merge branch '18849-project-snippets-page-isn-t-really-responsive' into 'master' 2016-09-15 22:26:32 +00:00
runners_helper.rb
search_helper.rb Backport search_helper changes from EE 2016-09-14 14:31:02 +03:00
selects_helper.rb
sentry_helper.rb Fix Sentry not reporting right program for Sidekiq workers 2016-08-25 19:42:52 -07:00
services_helper.rb Add option to confidential issues events to trigger services 2016-08-31 18:34:45 -03:00
sidekiq_helper.rb Remove original regexp 2016-09-08 19:41:25 +02:00
snippets_helper.rb Reordered dropdown options 2016-09-07 15:12:03 +01:00
sorting_helper.rb Restore Largest repository sort option on admin projects page 2016-08-15 16:01:23 -05:00
submodule_helper.rb
tab_helper.rb
tags_helper.rb filters tags by name 2016-08-31 11:42:33 +01:00
time_helper.rb Cleanup the use of duration and optimize some queries 2016-08-10 23:12:02 +08:00
todos_helper.rb Removed inline JS and improved dropdown labels 2016-09-01 14:35:34 +01:00
tree_helper.rb Update tree view to sort folders with submodules 2016-08-09 14:08:47 +01:00
triggers_helper.rb
u2f_helper.rb
version_check_helper.rb
visibility_level_helper.rb
workhorse_helper.rb Verify JWT messages from gitlab-workhorse 2016-09-05 15:05:31 +02:00