summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Implement Cycle Analytics frontend.Fatih Acet2016-09-151-3/+2
| | | | |
| * | | | Improve performance of the cycle analytics page.Timothy Andrew2016-09-1518-120/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. These changes bring down page load time for 100 issues from more than a minute to about 1.5 seconds. 2. This entire commit is composed of these types of performance enhancements: - Cache relevant data in `IssueMetrics` wherever possible. - Cache relevant data in `MergeRequestMetrics` wherever possible. - Preload metrics 3. Given these improvements, we now only need to make 4 SQL calls: - Load all issues - Load all merge requests - Load all metrics for the issues - Load all metrics for the merge requests 4. A list of all the data points that are now being pre-calculated: a. The first time an issue is mentioned in a commit - In `GitPushService`, find all issues mentioned by the given commit using `ReferenceExtractor`. Set the `first_mentioned_in_commit_at` flag for each of them. - There seems to be a (pre-existing) bug here - files (and therefore commits) created using the Web CI don't have cross-references created, and issues are not closed even when the commit title is "Fixes #xx". b. The first time a merge request is deployed to production When a `Deployment` is created, find all merge requests that were merged in before the deployment, and set the `first_deployed_to_production_at` flag for each of them. c. The start / end time for a merge request pipeline Hook into the `Pipeline` state machine. When the `status` moves to `running`, find the merge requests whose tip commit matches the pipeline, and record the `latest_build_started_at` time for each of them. When the `status` moves to `success`, record the `latest_build_finished_at` time. d. The merge requests that close an issue - This was a big cause of the performance problems we were having with Cycle Analytics. We need to use `ReferenceExtractor` to make this calculation, which is slow when we have to run it on a large number of merge requests. - When a merge request is created, updated, or refreshed, find the issues it closes, and create an instance of `MergeRequestsClosingIssues`, which acts as a join model between merge requests and issues. - If a `MergeRequestsClosingIssues` instance links a merge request and an issue, that issue closes that merge request. 5. The `Queries` module was changed into a class, so we can cache the results of `issues` and `merge_requests_closing_issues` across various cycle analytics stages. 6. The code added in this commit is untested. Tests will be added in the next commit.
| * | | | Implement Cycle Analytics frontend.Fatih Acet2016-09-158-52/+255
| | | | |
| * | | | wip: perfTimothy Andrew2016-09-143-17/+20
| | | | |
| * | | | Add a `seed_fu` fixture to generate data for cycle analytics.Timothy Andrew2016-09-141-0/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The fixture generates data for every stage in the cycle analytics dashboard. Once this fixture has run, you shouldn't be seeing any "<not enough data>" messages for cycle analytics. - This is probably not necessary for every fixture run, so it might be moved behind an env var in the future.
| * | | | Add a JSON version of the `CycleAnalytics` page.Timothy Andrew2016-09-083-0/+13
| | | | |
| * | | | Merge remote-tracking branch 'origin/master' into 21170-cycle-analyticsTimothy Andrew2016-09-07478-3473/+7528
| |\ \ \ \
| * | | | | Fix rubocop spec.Timothy Andrew2016-09-071-2/+2
| | | | | |
| * | | | | Consolidate all cycle analytics helper methods.Timothy Andrew2016-09-078-264/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Move the test generation to `CycleAnalyticsHelpers::TestGeneration` 2. Move all helper methods (previously placed in each individual spec file) to `CycleAnalyticsHelpers`
| * | | | | Add a test case for "end condition happens before start condition".Timothy Andrew2016-09-071-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | - In the cycle analytics specs.
| * | | | | Test the `test` cycle analytics phase.Timothy Andrew2016-09-072-2/+92
| | | | | |
| * | | | | Test the `production` cycle analytics phase.Timothy Andrew2016-09-072-1/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a `before_end_fn` option to the code that generates cycle analytics specs. `before_end_fn` is called before the end conditions are. Used for data setup that needs to be called after the start conditions and before the end conditions.
| * | | | | Test the `staging` cycle analytics phase.Timothy Andrew2016-09-073-4/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove overlap from the "start + end" durations in the happy test case. For the `staging` phase, the end time is the _first_ deployment that happens after the MR merge. If we have 5 MRs where the `start_time`s (merge time) are the same, and all the `end_time`s (deploy to production) a few days from now, only the earliest deploy will get picked up, because that consitutes a deploy for _all_ the MRs. We fix this by removing overlap. Every `start_time` is now generated to be _after_ the preceding `end_time`.
| * | | | | Generate branch/file names more randomly to avoid failures.Timothy Andrew2016-09-074-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Tests would randomly fail because of naming conflicts. - Use a `random_git_name` method instead of using `FFaker` directly.
| * | | | | Test the 'review' cycle analytics phase.Timothy Andrew2016-09-071-0/+45
| | | | | |
| * | | | | Test the `code` cycle analytics phase.Timothy Andrew2016-09-074-25/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move the "data belongs to other project" test case into the generated tests, and remove the explicit tests from the `code` and `plan` phases.
| * | | | | Refactor cycle analytics specs.Timothy Andrew2016-09-023-180/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Generalise the specs that will be common across all cycle analytics phases. 2. Rewrite specs `issue` and `plan` to use this abstracted testing strategy. 3. Specs that are specific to a given phase, or unwieldy to test in an abstracted manner, are added to each phase's spec.
| * | | | | Add tests for the `plan` cycle analytics phase.Timothy Andrew2016-09-022-63/+188
| | | | | | | | | | | | | | | | | | | | | | | | Clean up the `issue` tests as well
| * | | | | Tweak cycle analytics query to match the current requirements.Timothy Andrew2016-09-022-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The `review` phase ends when a MR is merged, not "merged OR closed". - The `code` phase starts when a MR is first mentioned in a commit, and ends when a merge request closing the issue is created. - The `plan` phase ends when the issue first mentioned in a commit. --- - Fix the `median` function so it sorts the incoming data points. - A data point where `end_time` is prior to `start_time` is invalid.
| * | | | | Authorize access to cycle analytics.Timothy Andrew2016-08-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All users with "Reporter" access (and above) to a project can see the Cycle Analytics page.
| * | | | | Fetch cycle analytics data for a specific date range.Timothy Andrew2016-08-265-24/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Supported date ranges are 30 / 90 days ago. The default is 90 days ago. 2. All issues created before "x days ago" are filtered out, even if they have other related data (test runs, merge requests) within the filter range.
| * | | | | Fix minor error in 'CycleAnalytics#show'Timothy Andrew2016-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - <Not enough data> wasn't being displayed in the 'Issue' and 'Plan' sections.
| * | | | | Scope Cycle Analytics queries to a projectTimothy Andrew2016-08-264-20/+29
| | | | | |
| * | | | | Add a spec for the `CycleAnalytics#issue` method.Timothy Andrew2016-08-263-0/+82
| | | | | |
| * | | | | Allow multiple queries for each cycle analytics section.Timothy Andrew2016-08-262-37/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Pass in an array of queries - the first to return a value will be used. This makes it easier to add more heuristics later. 2. Convert all queries with 'or' in the title to two separate queries. 3. Rename all `mr_` methods to `merge_request_`
| * | | | | Add the "Test" cycle analytics section.Timothy Andrew2016-08-263-0/+35
| | | | | |
| * | | | | Add the "Production" cycle analytics section.Timothy Andrew2016-08-263-21/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Rewrite the `Queries` module to work off a `data_point` hash, with `issue` and `merge_request` as keys. The "production" query needs both an issue and a merge request to make it's calculation, so it makes sense to keep things consistent and provide the same data (issue + merge request) for all queries.
| * | | | | Add the "Staging" cycle analytics section.Timothy Andrew2016-08-263-2/+38
| | | | | |
| * | | | | Add the "Review" cycle analytics section.Timothy Andrew2016-08-267-7/+49
| | | | | |
| * | | | | Add the "Code" Cycle Analytics section.Timothy Andrew2016-08-267-12/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Record the `wip_flag_first_removed_at` and `first_assigned_to_user_other_than_author` metrics for a merge request. Use a `merge_request_metrics` table, similar to the one for `issues`. Metrics are recorded `after_save`. 2. Move larger queries to a `CycleAnalytics::Queries` module.
| * | | | | Add the "Plan" Cycle Analytics query.Timothy Andrew2016-08-263-29/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Move from raw SQL to ActiveRecord. 2. Add a non-persisted `CycleAnalytics` model to store all the queries.
| * | | | | Display numbers for the "Issue (Tracker)" cycle analytics metric.Timothy Andrew2016-08-263-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | 1. Code is messy and untested, but it is a start.
| * | | | | Add an `Issue::Metrics` model.Timothy Andrew2016-08-264-1/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - And store the `first_associated_with_milestone_at` and `first_added_to_board_at` times, when an issue is saved.
* | | | | | Merge branch 'issue_20078' into 'master' Yorick Peterse2016-09-202-0/+14
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test if issue authors can access private projects See merge request !6419
| * | | | | | Test if issue authors can access private projectsFelipe Artur2016-09-202-0/+14
| | | | | | |
* | | | | | | Merge branch 'doc/cycle-analytics' into 'master' Achilleas Pipinellis2016-09-203-0/+113
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add docs on Cycle Analytics Document Cycle Analytics first iteration https://gitlab.com/gitlab-org/gitlab-ce/issues/21170 See merge request !6437
| * | | | | | | Add docs on Cycle AnalyticsAchilleas Pipinellis2016-09-203-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | Merge branch 'slash-commands-load-fix' into 'master' Robert Speicher2016-09-204-3/+26
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed slash commands not loading ## What does this MR do? Fixes an issue with slash commands not working when the autocomplete source is loading & then the new issue button is clicked. This also fixes an issue where the autocomplete source is loaded on pages where it isn't actually needed. ## What are the relevant issue numbers? Closes #21774, #21807 See merge request !6207
| * | | | | | | | Moved loading GFM source into zen.html.hamlslash-commands-load-fixPhil Hughes2016-09-162-2/+3
| | | | | | | | |
| * | | | | | | | Use admin user in testsPhil Hughes2016-09-161-3/+1
| | | | | | | | |
| * | | | | | | | Fixed group milestone errorPhil Hughes2016-09-161-1/+1
| | | | | | | | |
| * | | | | | | | Correctly loads gfm autocomplete source on pages where it is requiredPhil Hughes2016-09-166-7/+27
| | | | | | | | |
| * | | | | | | | Fixed slash commands not loadingPhil Hughes2016-09-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #21774
* | | | | | | | | Merge branch 'update_issues_mr_counter' into 'master' Rémy Coutable2016-09-2019-60/+132
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix issues with wrong issues/merge request counts when filters are selected Closes #15356 plus counter for issues and MR are now displayed for the these paths `https://gitlab.com/groups/group-name/issues` `https://gitlab.com/groups/group-name/merge_requests` `https://gitlab.com/dashboard/issues` and `https://gitlab.com/dashboard/merge_requests` See merge request !4960
| * | | | | | | | fix issues mr counterbarthc2016-09-2019-60/+132
| | |_|_|_|_|_|/ | |/| | | | | |
* | | | | | | | Merge branch 'JonTheNiceGuy/gitlab-ce-Ubuntu-16.04-Package'Rémy Coutable2016-09-202-0/+13
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | See gitlab-org/gitlab-ce!6247.
| * | | | | | | | Update .pkgr.yml with Ubuntu 16.04 dependenciesJon "The Nice Guy" Spriggs2016-09-202-0/+13
| | | | | | | | |
* | | | | | | | | Merge branch 'add_optional_author_for_commits' into 'master' Rémy Coutable2016-09-2012-68/+298
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add optional 'author' param when making commits This fulfills https://gitlab.com/gitlab-org/gitlab-ce/issues/20789 by adding the ability to specify a user's ID to be used as the author of a commit. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/20789 See merge request !5822
| * | | | | | | | Add optional 'author' param when making commitsDan Dunckel2016-09-1912-68/+298
| | | | | | | | |
* | | | | | | | | Merge branch '22218-fix-note-form-footer' into 'master' Robert Speicher2016-09-206-11/+126
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix note form hint showing slash commands supported for commits ## What are the relevant issue numbers? Closes #22218 See merge request !6368