CSV download for Merge Commits
-
Review changes -
-
Download -
Patches
-
Plain diff
All threads resolved!
All threads resolved!
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
Edited by Aishwarya Subramanian
Merge request reports
Compare and
Show latest version
- version 43b99813f1
- version 42e805e445
- version 415aa94adb
- version 4040138430
- version 3915823758
- version 3881f6436a
- version 37d23b2748
- version 369870d1d1
- version 351dd60a47
- version 34cdaccf53
- version 33a8b256f0
- version 32169cfc91
- version 319890d178
- version 30ce213aaf
- version 290a766731
- version 287bd302ef
- version 272bf819e5
- version 2689054eee
- version 254b31ef78
- version 24fcc76f35
- version 23089f3b92
- version 2278ebd33a
- version 2143a92695
- version 20331db2dd
- version 19b59dba2a
- version 1896e22c33
- version 17f1552c96
- version 16ba8213af
- version 159dc432ff
- version 141d915d39
- version 134629fb3d
- version 12f40842f0
- version 11f95c7809
- version 103fb742c0
- version 9f67e5cee
- version 82a485900
- version 7cb5538f4
- version 63c25af1e
- version 5544ac531
- version 4abf86ef9
- version 3f46aa5bd
- version 293e23ed0
- version 16ab9bb5e
- master (base)
- latest version4a5268001 commit,
- version 43b99813f11 commit,
- version 42e805e4452 commits,
- version 415aa94adb3 commits,
- version 40401384302 commits,
- version 39158237582 commits,
- version 3881f6436a2 commits,
- version 37d23b27482 commits,
- version 369870d1d13 commits,
- version 351dd60a472 commits,
- version 34cdaccf532 commits,
- version 33a8b256f01 commit,
- version 32169cfc911 commit,
- version 319890d1781 commit,
- version 30ce213aaf1 commit,
- version 290a7667312 commits,
- version 287bd302ef1 commit,
- version 272bf819e51 commit,
- version 2689054eee1 commit,
- version 254b31ef782 commits,
- version 24fcc76f351 commit,
- version 23089f3b921 commit,
- version 2278ebd33a1 commit,
- version 2143a926951 commit,
- version 20331db2dd1 commit,
- version 19b59dba2a1 commit,
- version 1896e22c331 commit,
- version 17f1552c969 commits,
- version 16ba8213af7 commits,
- version 159dc432ff6 commits,
- version 141d915d395 commits,
- version 134629fb3d4 commits,
- version 12f40842f03 commits,
- version 11f95c78094 commits,
- version 103fb742c03 commits,
- version 9f67e5cee2 commits,
- version 82a4859001 commit,
- version 7cb5538f41 commit,
- version 63c25af1e1 commit,
- version 5544ac5316 commits,
- version 4abf86ef95 commits,
- version 3f46aa5bd4 commits,
- version 293e23ed03 commits,
- version 16ab9bb5e2 commits,
261 files
+ 5031
− 2506
Compare changes
- Side-by-side
- Inline
Some changes are not shown
For a faster browsing experience, some files are collapsed by default.
Files
261@@ -12,7 +12,7 @@ Remove the `:feature_name` feature flag ...
@@ -12,7 +12,7 @@ Remove the `:feature_name` feature flag ...
Loading