summaryrefslogtreecommitdiff
path: root/app/models/merge_request
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42GitLab Bot2022-12-201-7/+0
|
* Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42GitLab Bot2022-09-191-0/+7
|
* Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42GitLab Bot2022-08-182-2/+40
|
* Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42GitLab Bot2022-06-201-0/+12
|
* Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42GitLab Bot2021-09-201-2/+17
|
* Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42GitLab Bot2021-07-202-4/+146
|
* Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42GitLab Bot2021-05-191-1/+1
|
* Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42GitLab Bot2021-02-181-0/+8
|
* Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42GitLab Bot2020-12-171-0/+5
|
* Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42GitLab Bot2020-11-191-0/+14
|
* Add latest changes from gitlab-org/gitlab@13-3-stable-eeGitLab Bot2020-08-201-1/+12
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-091-88/+0
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-031-0/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-131-0/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-021-20/+40
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-11-221-0/+66
|
* Inherit from ApplicationRecord instead of ActiveRecord::BaseNick Thomas2019-03-281-1/+1
|
* Enable more frozen string in app/models/**/*.rbgfyoung2018-08-071-0/+2
| | | | Partially addresses #47424.
* Cache merged and closed events data in merge_request_metrics tableOswaldo Ferreira2018-01-021-8/+2
|
* Renamed pipeline column and fixed permissions for builds in events controllerJames Lopez2016-11-171-1/+1
|
* add pipeline id to merge request metrics table. Also, updated the pipeline ↵James Lopez2016-11-171-0/+1
| | | | worker to populate this field.
* Implement (some) comments from @DouweM's review.Timothy Andrew2016-09-201-1/+1
| | | | | | - Move things common to `Issue` and `MergeRequest` into `Issuable` - Move more database-specific functions into `Gitlab::Database` - Indentation changes and other minor refactorings.
* Implement review comments from @yorickpeterseTimothy Andrew2016-09-201-12/+0
| | | | | | | | | | | | | | 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
* Remove unused merge request metrics.Timothy Andrew2016-09-191-12/+0
| | | | | | - These are not being used anymore. - Consolidate all issue metrics into a single migration. - Consolidate all merge request metrics into a single migration.
* Improve performance of the cycle analytics page.Timothy Andrew2016-09-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add the "Review" cycle analytics section.Timothy Andrew2016-08-261-0/+8
|
* Add the "Code" Cycle Analytics section.Timothy Andrew2016-08-261-0/+15
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.