CSV download for Merge Commits
What does this MR do?
This MR adds the backend changes for group owners and admins to download a CSV copy of Merge Commits for a Group.
The download option will be present in the Compliance dashboard. FE MR: !38513 (merged)
It restricts the download file up to 15MB.
Mentions #213364 (closed)
Screenshots
Example CSV file: 119-merge-commits-1596485203.csv
Database changes
Query using MergeRequestFinder
Query
explain SELECT
"merge_requests".*
FROM
"merge_requests"
INNER JOIN "projects" ON "projects"."id" = "merge_requests"."target_project_id"
LEFT JOIN project_features ON projects.id = project_features.project_id
WHERE
"projects"."namespace_id" = 9970
AND (EXISTS (
SELECT
1
FROM
"project_authorizations"
WHERE
"project_authorizations"."user_id" = 4014344
AND (project_authorizations.project_id = projects.id))
OR projects.visibility_level IN (0, 10, 20))
AND ("project_features"."merge_requests_access_level" > 0
OR "project_features"."merge_requests_access_level" IS NULL)
AND ("merge_requests"."state_id" IN (3))
ORDER BY
"merge_requests"."id" ASC
LIMIT 1000
Plan execution: https://explain.depesz.com/s/GS3T
Execution Time:
Time: 4.693 s
- planning: 2.370 ms
- execution: 4.690 s
- I/O read: 4.319 s
- I/O write: 0.000 ms
Shared buffers:
- hits: 6645 (~51.90 MiB) from the buffer pool
- reads: 71478 (~558.40 MiB) from the OS file cache, including disk I/O
- dirtied: 1492 (~11.70 MiB)
- writes: 0
#database-lab: https://gitlab.slack.com/archives/CLJMDRD8C/p1597200797223700
Migration
== 20200810160031 AddIndexMergedStateOnMergeRequests: migrating ===============
-- transaction_open?()
-> 0.0000s
-- index_exists?(:merge_requests, [:target_project_id, :iid, :state_id], {:where=>"state_id = 3", :name=>"index_merged_state_on_merge_requests", :algorithm=>:concurrently})
-> 0.0099s
-- add_index(:merge_requests, [:target_project_id, :iid, :state_id], {:where=>"state_id = 3", :name=>"index_merged_state_on_merge_requests", :algorithm=>:concurrently})
-> 0.0062s
== 20200810160031 AddIndexMergedStateOnMergeRequests: migrated (0.0166s) ======
Rollback
== 20200810160031 AddIndexMergedStateOnMergeRequests: reverting ===============
-- transaction_open?()
-> 0.0000s
-- indexes(:merge_requests)
-> 0.0177s
-- remove_index(:merge_requests, {:algorithm=>:concurrently, :name=>"index_merged_state_on_merge_requests"})
-> 0.0064s
== 20200810160031 AddIndexMergedStateOnMergeRequests: reverted (0.0248s) ======
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Merge request reports
Activity
changed milestone to %13.3
added backend devopsmanage groupcompliance labels
added typefeature label
1 Message This merge request adds or changes files that require a review from the Database team. This merge request requires a database review. To make sure these changes are reviewed, take the following steps:
- Ensure the merge request has database and databasereview pending labels. If the merge request modifies database files, Danger will do this for you.
- Prepare your MR for database review according to the docs.
- Assign and mention the database reviewer suggested by Reviewer Roulette.
Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited, or the chosen person is unavailable.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not automatically notify them for you.
Category Reviewer Maintainer backend Ryan Cobb ( @rcobb
) (UTC-7, 2 hours behind@asubramanian1
)Mayra Cabrera ( @mayra-cabrera
) (UTC-5, same timezone as@asubramanian1
)database Nikola Milojevic ( @nmilojevic1
)Tiger Watson ( @tigerwnz
)If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by 🤖 GitLab Bot 🤖added 1434 commits
-
544ac531...dbbdcf45 - 1433 commits from branch
master
- 3c25af1e - Service for merge commit csv export
-
544ac531...dbbdcf45 - 1433 commits from branch
added database databasereview pending labels
added 270 commits
-
2a485900...1a333a9b - 268 commits from branch
master
- 9235da3f - Service for merge commit csv export
- f67e5cee - Initial FE changes
-
2a485900...1a333a9b - 268 commits from branch
Bundle size analysis [beta]
This compares changes in bundle size for entry points between the commits f802d0bf and 40138430
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 4 MB 4 MB - -0.0 % mainChunk 3.16 MB 3.16 MB - 0.0 %
Note: We do not have exact data for f802d0bf. So we have used data from: 2d896d3e.
The target commit was too new, so we used the latest commit from master we have info on.
It might help to rerun thebundle-size-review
job
This might mean that you have a few false positives in this report. If something unrelated to your code changes is reported, you can check this comparison in order to see if they caused this change.Please look at the full report for more details
Read more about how this report works.
Generated by
DangerEdited by 🤖 GitLab Bot 🤖added 162 commits
-
f95c7809...cbf53224 - 159 commits from branch
master
- 875a114f - Service for merge commit csv export
- 3ce1c5dc - Initial FE changes
- f40842f0 - Added file name
Toggle commit list-
f95c7809...cbf53224 - 159 commits from branch
added 2 commits
marked the checklist item Changelog entry as completed
mentioned in merge request !38513 (merged)
- Resolved by Aishwarya Subramanian
assigned to @tancnle and unassigned @asubramanian1
- Resolved by Aishwarya Subramanian
- Resolved by Tan Le
- Resolved by Tan Le
- Resolved by Tan Le
- Resolved by Tan Le
- Resolved by Tan Le
- Resolved by Aishwarya Subramanian
- Resolved by Tan Le
assigned to @asubramanian1
unassigned @tancnle
added 373 commits
-
43a92695...8466ccb9 - 372 commits from branch
master
- 78ebd33a - Backend changes for merge commit csv export
-
43a92695...8466ccb9 - 372 commits from branch
assigned to @tancnle and unassigned @asubramanian1
added 71 commits
-
89054eee...116d7b5c - 70 commits from branch
master
- 2bf819e5 - Backend changes for merge commit csv export
-
89054eee...116d7b5c - 70 commits from branch
@nmilojevic1 - Would you mind reviewing the database changes when you get a chance?
assigned to @nmilojevic1
- Resolved by Aishwarya Subramanian
- Resolved by Aishwarya Subramanian
- Resolved by Aishwarya Subramanian
- Resolved by Aishwarya Subramanian
- Resolved by Aishwarya Subramanian
- Resolved by Tan Le
- Resolved by Aishwarya Subramanian
- Resolved by Aishwarya Subramanian
- Resolved by Aishwarya Subramanian
- Resolved by Tan Le
- Resolved by Aishwarya Subramanian
assigned to @asubramanian1 and unassigned @tancnle
mentioned in merge request gitlab-com/www-gitlab-com!58760 (merged)
added 152 commits
-
2bf819e5...a0942103 - 151 commits from branch
master
- 7bd302ef - Backend changes for merge commit csv export
-
2bf819e5...a0942103 - 151 commits from branch
assigned to @tancnle and unassigned @asubramanian1
- Resolved by Aishwarya Subramanian
- Resolved by Aishwarya Subramanian
- Resolved by Aishwarya Subramanian
assigned to @asubramanian1
unassigned @tancnle
- Resolved by Steve Abrams
assigned to @dstull and unassigned @asubramanian1 and @nmilojevic1
assigned to @asubramanian1
unassigned @dstull
removed database databasereview pending labels
- Resolved by Michael Kozono
assigned to @mkozono and unassigned @asubramanian1
- Resolved by Michael Kozono
- Resolved by Tiger Watson
- Resolved by Aishwarya Subramanian
assigned to @asubramanian1 and unassigned @mkozono
added 2 commits
added 770 commits
-
cdaccf53...0b6c4ef7 - 768 commits from branch
master
- 34944cfd - Backend changes for merge commit csv export
- 1dd60a47 - Reorganized query pattern
-
cdaccf53...0b6c4ef7 - 768 commits from branch
added database databasereview pending labels
assigned to @mkozono and unassigned @asubramanian1
- Resolved by Aishwarya Subramanian
assigned to @asubramanian1 and unassigned @dstull
assigned to @dstull
- Resolved by Aishwarya Subramanian
- Resolved by Aishwarya Subramanian
- Resolved by Steve Abrams
- Resolved by Steve Abrams
unassigned @sabrams
mentioned in issue gitlab-com/www-gitlab-com#5028 (closed)
assigned to @sabrams and unassigned @asubramanian1
added databasereviewed label and removed databasereview pending label
assigned to @asubramanian1 and unassigned @tigerwnz
added 783 commits
-
e805e445...e4695080 - 782 commits from branch
master
- b99813f1 - Backend changes for merge commit csv export
-
e805e445...e4695080 - 782 commits from branch
mentioned in issue #236000
assigned to @mkozono and unassigned @asubramanian1
mentioned in commit ff4ceff3
mentioned in issue gitlab-org/manage/general-discussion#17236
mentioned in issue #213364 (closed)
added workflowstaging label
added workflowcanary label and removed workflowstaging label
added workflowproduction label and removed workflowcanary label
mentioned in issue #36750 (closed)