summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Change "Please register or login" to "Please sign up or sign in"rs-sign-up-sign-inRobert Speicher2016-09-211-2/+2
| | | | Now this is more consistent with the rest of the app.
* Merge branch 'post-merge-improve-of-ci-permissions' into 'master' Rémy Coutable2016-09-218-18/+30
|\ | | | | | | | | | | | | Post-merge improve of CI permissions Improves code from !6409 See merge request !6432
| * Improve JwtController implementationpost-merge-improve-of-ci-permissionsKamil Trzcinski2016-09-204-8/+11
| |
| * Post-merge improve of CI permissionsKamil Trzcinski2016-09-206-15/+24
| |
* | Merge branch 'cs-upgrade-sidekiq' into 'master' Robert Speicher2016-09-212-11/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade Sidekiq to 4.2.1, remove dependency on Sinatra This updates Sidekiq to 4.2.1, which adds full support for Rails 5 by removing a dependency on Sinatra which was one of the remaining Rails 5 blockers. Major things to check: Sidekiq still works, obviously. Also that the Web UI/Admin dashboard works and doesn't lose any functionality (based on my testing it works fine). Working toward #14286. Changelog: https://github.com/mperham/sidekiq/blob/921e939f995fbb5238975d4121d728b95be99ab5/Changes.md#421 See merge request !6349
| * | Upgrade Sidekiq from 4.1.4 to 4.2.1, remove dependency on SinatraConnor Shea2016-09-152-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | Changelog: https://github.com/mperham/sidekiq/blob/921e939f995fbb5238975d4121d728b95be99ab5/Changes.md#421 Sinatra is no longer required and sidekiq uses a vanilla Rack app for its Web UI now.
* | | Merge branch '21170-cycle-analytics' into 'master' Stan Hu2016-09-2159-5/+2220
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Implement fourth round of comments from @DouweM.Timothy Andrew2016-09-213-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | - Pluralize summary titles - Remove the `run_query` method - always return sql strings from the `date_time_sql` methods
| * | | Fix `CreateDeploymentService` spec.Timothy Andrew2016-09-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The spec tests that if: - The merge request is merged - The target branch is deployed to production - The `first_deployed_to_production_at` metric is `nil` (for some reason) - The target branch is deployed to production again - The `first_deployed_to_production_at` metric stays as `nil` (and is not overwritten). 2. Failure only on MySQL due to some datetime weirdness.
| * | | Reload issues in spec to ensure label<->issue mapping properly loaded21170-cycle-analyticsStan Hu2016-09-201-0/+2
| | | |
| * | | Fix build.Timothy Andrew2016-09-213-8/+8
| | | |
| * | | Remove unnecessary #{} in cycle analytics template.Fatih Acet2016-09-211-1/+1
| | | |
| * | | Update cycle analytics icon and fix color of the dismiss button.Fatih Acet2016-09-212-1/+2
| | | |
| * | | Use triple dashes for the empty value in cycle analytics.Fatih Acet2016-09-211-1/+1
| | | |
| * | | Fix typo on cycle analytics copy.Fatih Acet2016-09-211-1/+1
| | | |
| * | | Add page title and fix sub menu width in Cycle Analytics page.Fatih Acet2016-09-211-1/+3
| | | |
| * | | Update Cycle Analytics Read more link URL.Fatih Acet2016-09-211-1/+1
| | | |
| * | | Display the cycle analytics navbar based on the `:read_cycle_analytics` ability.Timothy Andrew2016-09-211-1/+1
| | | |
| * | | Improve indentation in `Gitlab::Database::Median`Timothy Andrew2016-09-211-11/+18
| | | |
| * | | Add a spec for merge request metric caching while refreshing a merge request ↵Timothy Andrew2016-09-214-12/+38
| | | | | | | | | | | | | | | | from a forked project.
| * | | Use the `IssuableBaseService` lifecycle hooks to cache ↵Timothy Andrew2016-09-219-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `MergeRequestsClosingIssues` - Instead of overriding `create` and `update` in `MergeRequests::BaseService` - Get all merge request service specs passing
| * | | Implement a second round of review comments from @DouweM.Timothy Andrew2016-09-2123-205/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't use `TableReferences` - using `.arel_table` is shorter! - Move some database-related code to `Gitlab::Database` - Remove the `MergeRequest#issues_closed` and `Issue#closed_by_merge_requests` associations. They were either shadowing or were too similar to existing methods. They are not being used anywhere, so it's better to remove them to reduce confusion. - Use Rails 3-style validations - Index for `MergeRequest::Metrics#first_deployed_to_production_at` - Only include `CycleAnalyticsHelpers::TestGeneration` for specs that need it. - Other minor refactorings.
| * | | Move JSON generation (cycle analytics) into a controller method.Timothy Andrew2016-09-202-37/+34
| | | | | | | | | | | | | | | | Helper methods are meant for views
| * | | Add CHANGELOG entry.Timothy Andrew2016-09-201-0/+1
| | | |
| * | | Fix rubocop spec.Timothy Andrew2016-09-205-12/+14
| | | | | | | | | | | | | | | | And `scss_lint`
| * | | Implement (some) comments from @DouweM's review.Timothy Andrew2016-09-2010-123/+127
| | | | | | | | | | | | | | | | | | | | | | | | - Move things common to `Issue` and `MergeRequest` into `Issuable` - Move more database-specific functions into `Gitlab::Database` - Indentation changes and other minor refactorings.
| * | | Update schema.rbTimothy Andrew2016-09-201-12/+12
| | | |
| * | | Fix spec failures.Timothy Andrew2016-09-206-12/+16
| | | |
| * | | Fix `ON DELETE CASCADE` migrations.Timothy Andrew2016-09-203-4/+4
| | | | | | | | | | | | | | | | Incorrect syntax.
| * | | Cycle analytics should be accessible to all for public projects.Timothy Andrew2016-09-201-1/+2
| | | | | | | | | | | | | | | | | | | | - Public projects - anyone can access - Private projects - any member (guest level and above) can access
| * | | Implement review comments from @yorickpeterseTimothy Andrew2016-09-2017-225/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Change multiple updates to a single `update_all` 2. Use cascading deletes 3. Extract an average function for the database median. 4. Move database median to `lib/gitlab/database` 5. Use `delete_all` instead of `destroy_all` 6. Minor refactoring
| * | | Merge remote-tracking branch 'origin/master' into 21170-cycle-analyticsTimothy Andrew2016-09-20528-5141/+11166
| |\ \ \
| * | | | Cycle Analytics: A value of 0 is changed to `nil`.Timothy Andrew2016-09-201-1/+1
| | | | |
| * | | | Implement a database median strategy for MySQL.Timothy Andrew2016-09-202-23/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Dispatch between the two strategies automatically based on the current database type. 2. The MySQL version needs to run multiple statements, so the `cycle_analytics` model is modified to support this.
| * | | | Miscellaneous cycle-analytics-related changes.Timothy Andrew2016-09-202-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add indexes to `CreateMergeRequestsClosingIssues` columns. 2. Remove an extraneous `check_if_open` check that is redundant now. It would've been better to rebase this in, but that's not possible because more people are working on this branch.
| * | | | Fix all cycle analytics specs.Timothy Andrew2016-09-207-16/+82
| | | | | | | | | | | | | | | | | | | | | | | | | A number of failures were introduced due to performance improvements (like pre-calculating metrics).
| * | | | CycleAnalytics operates on merge requests that have been deployed.Timothy Andrew2016-09-201-23/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Look for merge requests (and issues that they close) that have been deployed to production in the last X days (where X is given by the `from` parameter). 2. Cycle analytics queries only operate on this fitered set of merge requests and issues.
| * | | | Add a uniqueness constraint to `MergeRequestsClosingIssues`Timothy Andrew2016-09-201-0/+5
| | | | |
| * | | | Test the `CycleAnalytics::Summary` model.Timothy Andrew2016-09-204-6/+83
| | | | |
| * | | | Simplify vue template for cycle analytics.Fatih Acet2016-09-202-11/+11
| | | | |
| * | | | Finalise cycle analytics frontend.Fatih Acet2016-09-195-139/+164
| | | | |
| * | | | Do _not_ set `stats` to `null` when data is not available.Timothy Andrew2016-09-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - For cycle analytics. - Instead, make each individual `value` `null`, since the titles and descriptions are used by the frontend even when there is no data.
| * | | | Make changes to the cycle analytics JSON endpoint.Timothy Andrew2016-09-193-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add `summary` section. 2. `stats` is `null` if no stats are present. 3. `stats` and `summary` are both arrays.
| * | | | Remove unused merge request metrics.Timothy Andrew2016-09-196-103/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - These are not being used anymore. - Consolidate all issue metrics into a single migration. - Consolidate all merge request metrics into a single migration.
| * | | | Test all cycle analytics pre-calculation code.Timothy Andrew2016-09-1912-10/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the code that pre-calculates metrics for use in the cycle analytics page. - Ci::Pipeline -> build start/finish - Ci::Pipeline#merge_requests - Issue -> record default metrics after save - MergeRequest -> record default metrics after save - Deployment -> Update "first_deployed_to_production_at" for MR metrics - Git Push -> Update "first commit mention" for issue metrics - Merge request create/update/refresh -> Update "merge requests closing issues"
| * | | | Remove extraneous code that was previously added for performance.Timothy Andrew2016-09-192-4/+2
| | | | |
| * | | | Move cycle analytics JSON generation to a helper.Timothy Andrew2016-09-173-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | 1. Use a new format, with each stage having a `title`, `description`, and `value.
| * | | | Move cycle analytics calculations to SQL.Timothy Andrew2016-09-173-36/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Use Arel for composable queries. 2. For a project with ~10k issues, the page loads in around 600ms. Previously, a project with ~5k issues would have a ~20s page load time.
| * | | | Add a "populate metrics directly" option to the cycle analytics seed.Timothy Andrew2016-09-171-3/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The normal seed creates all the data for cycle analytics the "right" way. It creates issues, merge requests, commits, branches, deployments, etc. This is good, but too slow for perf testing. Generating a 1000 sets of records this way takes more than an hour. - When the `CYCLE_ANALYTICS_POPULATE_METRICS_DIRECTLY` environment variable is passed in, the seed only creates issues and merge requests. It then adds the `metrics` for each issue and merge request directly, to save time. - The seed now takes about 4 minutes to run for 1000 sets of records.
| * | | | Fix layout for cycle analytics.Fatih Acet2016-09-162-39/+41
| | | | |