Dmitriy Zaporozhets
5500f9159f
Merge branch 'group-issues-sorting' into 'master'
...
Improve performance of getting issues on group level
For testing I used the URL http://localhost:3000/groups/gitlab-org/issues?milestone_title=8.1 . Prior to these changes said URL would take about 10-12 seconds to load. By applying these changes the loading time has been reduced to roughly 2-3 seconds.
There's still some stuff going on in some views that I have to look at, resolving those changes might reduce the loading time a bit more. I also still have to check if I didn't break too many tests.
Fixes: gitlab-org/gitlab-ce#3707 gitlab-org/gitlab-ce#4071
See merge request !2318
2016-01-11 15:28:41 +00:00
Dmitriy Zaporozhets
3c93e588e9
Merge branch 'annotate-models-20160105' into 'master'
...
Annotate models
Time to refresh the comments via `annotate`.
See merge request !2311
2016-01-07 18:22:32 +00:00
Yorick Peterse
19a0db30ba
Removed ORDER BY in "of_group" scopes
...
These scopes don't care about the order. Removing the explicit "ORDER
BY" can speed up the queries by a little bit.
2016-01-07 15:34:37 +01:00
Yorick Peterse
0d0049c058
Don't pluck IDs when getting issues/MRs per group
...
This replaces plucking of IDs with a sub-query, saving the overhead of
loading the data in Ruby and then mapping the rows to an Array of IDs.
This also scales much better when dealing with a large amount of IDs
that would be involved.
2016-01-07 14:53:02 +01:00
Stan Hu
79c0e7212a
Annotate models
2016-01-06 13:09:55 +00:00
Douwe Maan
097faeb481
Get "Merge when build succeeds" to work when commits were pushed to MR target branch while builds were running
2016-01-05 16:30:03 +01:00
Drew Blessing
f177aaa5fa
Backport JIRA service
2015-12-18 14:19:48 -06:00
Gabriel Mazetto
b5291f9599
Fixed Rubocop offenses
2015-12-15 00:53:52 -02:00
Dmitriy Zaporozhets
7a4d468576
Merge remote-tracking branch 'origin/mr-broken'
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-12-09 21:06:04 +01:00
Douwe Maan
f66454beaa
Add indication to merge request list item that MR cannot be merged automatically
2015-12-08 21:43:11 +01:00
Douwe Maan
75486f09c4
Merge branch 'master' into zj/gitlab-ce-merge-if-green
2015-12-08 13:43:45 +01:00
Valery Sizov
bd5fb1b479
Merge branch 'webhook_payload_with_changes' into 'master'
...
Add added, modified and removed properties to commit object in webhook
https://gitlab.com/gitlab-org/gitlab-ee/issues/20
See merge request !1988
2015-12-07 14:43:13 +00:00
Valery Sizov
5df2c4419c
fox specs
2015-12-07 14:14:35 +02:00
Zeger-Jan van de Weg
0e96d6eb10
Merge branch 'master' into merge-if-green
2015-12-07 10:06:07 +01:00
Zeger-Jan van de Weg
2462a96e45
Incorporate feedback
2015-12-05 15:42:38 +01:00
Zeger-Jan van de Weg
a7682f8775
Specs for 'Merge When Build Succeeds'
2015-12-02 13:27:16 +01:00
Douwe Maan
f3ea06eb7f
Autolink first so we don't pick up numeric anchors as issue references.
2015-12-01 15:53:32 +01:00
Douwe Maan
d6a5b45c8e
Recognize issue/MR/snippet/commit links as references.
2015-11-30 21:36:34 +01:00
Douwe Maan
8f43298d96
Show local issues and MRs in "This X closes... / closed by..." sentence
2015-11-30 21:09:36 +01:00
Zeger-Jan van de Weg
8608c6325e
Refactor MergeWhenBuildSucceedsService and incorporate feedback
2015-11-23 10:11:54 +01:00
Yorick Peterse
d496a6b919
Handle removed source projects in MR CI commits
...
When calling MergeRequest#ci_commit the code would previously raise an
error if the source project no longer existed (e.g. because the user
removed their fork).
See #3599 for more information.
2015-11-20 23:43:10 +01:00
Yorick Peterse
8591cc02be
Use a JOIN in IssuableFinder#by_project
...
When using IssuableFinder/IssuesFinder to find issues for multiple
projects it's more efficient to use a JOIN + a "WHERE project_id IN"
condition opposed to running a sub-query.
This change means that when finding issues without labels we're now
using the following SQL:
SELECT issues.*
FROM issues
JOIN projects ON projects.id = issues.project_id
LEFT JOIN label_links ON label_links.target_type = 'Issue'
AND label_links.target_id = issues.id
WHERE (
projects.id IN (...)
OR projects.visibility_level IN (20, 10)
)
AND issues.state IN ('opened','reopened')
AND label_links.id IS NULL
ORDER BY issues.id DESC;
instead of:
SELECT issues.*
FROM issues
LEFT JOIN label_links ON label_links.target_type = 'Issue'
AND label_links.target_id = issues.id
WHERE issues.project_id IN (
SELECT id
FROM projects
WHERE id IN (...)
OR visibility_level IN (20,10)
)
AND issues.state IN ('opened','reopened')
AND label_links.id IS NULL
ORDER BY issues.id DESC;
The big benefit here is that in the last case PostgreSQL can't properly
use all available indexes. In particular it ends up performing a
sequence scan on the "label_links" table (processing around 290 000
rows). The new query is roughly 2x as fast as the old query.
2015-11-19 11:58:05 +01:00
Zeger-Jan van de Weg
53b285c9a8
Merge branch 'master' into merge-if-green
2015-11-18 11:58:01 +01:00
Zeger-Jan van de Weg
2f048df4a4
API support, incorporated feedback
2015-11-18 11:17:41 +01:00
Dmitriy Zaporozhets
a237999f00
Annotate models
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-11-13 19:22:46 +01:00
Minsik Yoon and 윤민식
3d0efa8e0a
Add ignore white space option in merge request diff
...
fix this issue(https://gitlab.com/gitlab-org/gitlab-ce/issues/1393 ).
Add ignore whitespace optoin to Commits Compare view
2015-11-13 16:53:53 +09:00
Zeger-Jan van de Weg
77f8a1e392
Merge when build succeeds
2015-11-02 17:27:38 +01:00
Dmitriy Zaporozhets
fe6ec80e75
Render CI status on merge requests index page
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-10-23 17:01:10 +02:00
Valery Sizov
95df86638d
Fix: Inability to reply to code comments in the MR view, if the MR comes from a fork
2015-10-22 18:38:00 +02:00
Douwe Maan
8710739e4e
Correctly find last known blob for file deleted in MR.
2015-10-20 14:24:02 +02:00
Zeger-Jan van de Weg
94a788f66d
Only accept open issues and merge requests
2015-10-16 09:59:32 +02:00
Zeger-Jan van de Weg
9f9f0c35ec
Show merge requests which close current issue
2015-10-16 09:46:59 +02:00
Ben Boeckel
6b73902733
merge_request: add work_in_progress to MR hooks
2015-10-08 16:37:04 -04:00
Ben Boeckel
380392212f
merge_request: coerce work_in_progress? into a boolean
2015-10-08 10:08:08 -04:00
Dmitriy Zaporozhets
3a001a9290
Fetch merge request ref if it is missing when visit MR page
...
This will fix merge problem for merge requests between forks created
before 8.0
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-09-21 16:25:59 +02:00
Stan Hu
d7812a95cf
Re-annotate models
2015-09-06 07:48:48 -07:00
Dmitriy Zaporozhets
3e259ea8bc
Revert "Merge branch 'revert-satellites' into 'master'
"
...
This reverts commit 5daf44b7c8 , reversing
changes made to 2f706fbd23 .
2015-08-11 14:33:31 +02:00
Dmitriy Zaporozhets
3b02ad8467
Revert "Merge branches inside one repository using rugged instead of satellites"
...
This reverts commit d24c40ec21 .
2015-08-11 10:50:39 +02:00
Dmitriy Zaporozhets
32046983ad
Revert "Merge branch 'refactor-can-be-merge' into 'master'"
...
This reverts commit 459e6d3467 , reversing
changes made to 804168e1de .
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-08-11 10:48:02 +02:00
Dmitriy Zaporozhets
9f10943c1a
Revert "Merge branch 'drop-satellites'"
...
This reverts commit 957e849f41 , reversing
changes made to 6b9dbe9f5a .
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-08-11 10:28:42 +02:00
Dmitriy Zaporozhets
84727fba96
Revert "Merge branch 'improve-merge-requests' into 'master'
"
...
This reverts commit 4773f38e28 , reversing
changes made to 0d5d80b735 .
2015-08-11 10:26:19 +02:00
Dmitriy Zaporozhets
8dce66234f
Fetch to mr code from fork to iid
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-08-07 12:35:04 +02:00
Dmitriy Zaporozhets
a7fded9b95
Huge refactoring for accepting merge requests
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-07-16 16:03:07 +02:00
Dmitriy Zaporozhets
26f5d6047d
Refactor compare and fetch logic
2015-07-15 17:28:09 +02:00
Dmitriy Zaporozhets
2a6f522cac
Implement merge from forks without satellites
2015-07-15 16:45:50 +02:00
Dmitriy Zaporozhets
a87989fb7d
Remove satellites
2015-07-15 15:45:57 +02:00
Dmitriy Zaporozhets
2e6bbb12f8
Refactor can_be_merged logic for merge request
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-07-01 17:24:03 +02:00
Dmitriy Zaporozhets
d24c40ec21
Merge branches inside one repository using rugged instead of satellites
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-07-01 16:23:58 +02:00
Dmitriy Zaporozhets
7524d7c082
Revert merge request states renaming
...
Replaced:
* "Accepted" with "Merged"
* "Rejected" with "Closed"
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-06-19 17:09:50 +02:00
Dmitriy Zaporozhets
946b4ceda3
Improve variables in mr widget
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-06-11 18:45:12 +02:00