gitlab-org--gitlab-foss/app/views/projects
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
..
artifacts
badges
blame Fix layout issues with blame table 2016-09-06 10:36:09 +01:00
blob Move editor paths to helper 2016-08-19 16:17:14 +01:00
boards Shows count at bottom of list 2016-08-31 09:47:25 +01:00
branches Hides merge request button on branches page 2016-09-02 14:33:24 +01:00
builds Render stages in valid order 2016-09-20 14:24:56 +02:00
buttons Fix download artifacts button link: 2016-09-19 13:12:45 +08:00
ci Remove empty stage state; fit tooltip on one line 2016-09-16 09:24:48 +02:00
commit Fix spec failures 2016-09-14 17:33:07 +02:00
commits Expire commit view partial after a day 2016-08-31 15:12:31 +01:00
compare
container_registry
cycle_analytics Remove unnecessary #{} in cycle analytics template. 2016-09-21 00:19:17 +03:00
deploy_keys
deployments Replace play icon font with svg 2016-09-01 10:50:55 -05:00
diffs Style merge request diff dropdowns & disable comments. 2016-09-14 19:08:29 +02:00
environments
find_file
forks Fix alignment of icon buttons (!5887) 2016-08-19 11:24:01 +02:00
generic_commit_statuses Fix spec failures 2016-09-14 17:33:07 +02:00
graphs Project tools visibility level 2016-09-01 11:47:59 -03:00
group_links Add descriptions 2016-08-18 19:44:09 -05:00
hooks Add option to confidential issues events to trigger Webhooks 2016-08-31 18:34:23 -03:00
imports
issues Merge branch '18849-project-snippets-page-isn-t-really-responsive' into 'master' 2016-09-15 22:26:32 +00:00
labels
merge_requests Merge branch 'master' into merge-request-push-compare-ui 2016-09-17 10:54:27 +02:00
milestones
network
notes Fix note form hint showing slash commands supported for commits 2016-09-20 13:58:14 +02:00
pipelines Display the cycle analytics navbar based on the :read_cycle_analytics ability. 2016-09-21 02:31:04 +05:30
pipelines_settings
project_members Fix expiration date picker after update 2016-09-02 16:29:07 +01:00
protected_branches Merge branch 'fix-empty-dropdown' into 'master' 2016-08-21 05:32:18 +00:00
refs Fix repo page ui issues, show full last commit message in repo view. 2016-08-31 18:28:15 +02:00
releases Fix layout of edit tags page 2016-08-18 13:32:20 -05:00
repositories Aggressively merge views, feedback: 2016-08-24 19:09:10 +08:00
runners
services
snippets Reordered dropdown options 2016-09-07 15:12:03 +01:00
tags add specs for tags finder 2016-08-31 19:16:47 +01:00
tree fixed incorrect reference to @repository.root_ref in _readme.html.haml. #22083 2016-09-16 06:49:17 -04:00
triggers Clean up and refactor the triggers views 2016-09-06 10:36:04 +02:00
variables Sort secret variables by key (fix #20870) 2016-09-09 15:06:50 -03:00
wikis Add horizontal scrolling to all sub-navs on mobile viewports 2016-08-25 18:01:37 -05:00
_activity.html.haml
_bitbucket_import_modal.html.haml
_commit_button.html.haml
_errors.html.haml
_files.html.haml
_find_file_link.html.haml
_gitlab_import_modal.html.haml
_home_panel.html.haml
_last_commit.html.haml
_last_push.html.haml
_md_preview.html.haml
_merge_request_settings.html.haml Move "Only allow merge requests to be merged if the build succeeds" to new location 2016-09-05 14:15:57 +02:00
_readme.html.haml
_zen.html.haml Moved loading GFM source into zen.html.haml 2016-09-16 10:52:41 +01:00
activity.html.haml
edit.html.haml Improved helper methods, better flow for project.lfs_enabled?, and UI fixes. 2016-09-15 12:27:32 -05:00
empty.html.haml
new.html.haml Fix GitLab import button 2016-09-02 08:19:14 +02:00
no_repo.html.haml
remove_fork.js.haml
show.atom.builder
show.html.haml Merge remote-tracking branch 'upstream/master' into artifacts-from-ref-and-build-name 2016-08-24 20:56:30 +08:00
transfer.js.haml
update.js.haml