- 16 Mar, 2016 1 commit
-
-
Hiroyuki Sato authored
-
- 15 Mar, 2016 9 commits
-
-
Zeger-Jan van de Weg authored
-
Zeger-Jan van de Weg authored
-
Rémy Coutable authored
1. Make the "subscribed" text in Issuable sidebar reflect the labels subscription status 2. Current user mut be logged-in to toggle issue/MR/label subscription
-
Hiroyuki Sato authored
-
Timothy Andrew authored
1. Allow subscribing (the current user) to a label - Refactor the `Subscription` coffeescript class - The main change is that it accepts a container, and conducts all DOM queries within its scope. We need this because the labels page has multiple instances of `Subscription` on the same page. 2. Creating an issue or MR with labels notifies users subscribed to those labels - Label `has_many` subscribers through subscriptions. 3. Adding a label to an issue or MR notifies users subscribed to those labels - This only applies to subscribers of the label that has just been added, not all labels for the issue.
-
Yorick Peterse authored
The queries that are UNION'd together don't need any eager loading (since we really only use the resulting SQL instead of having ActiveRecord actually run the queries). By dropping any eager loaded associations queries such as the following work instead of producing a SQL error: Project.all.includes(:namespace).search('foo')
-
Rémy Coutable authored
This reverts commit 01160fc0, reversing changes made to 4bff9daf.
-
Rémy Coutable authored
Related to #2235. This is done by: 1. Delaying the notification sending after the SSH key is commited in DB 2. Gracefully exit the mailer method if the record cannot be found
-
Kamil Trzcinski authored
This solves the problem with caching the nil value with instance variable. Without this the every time we ask for external_issue_tracker we built AR and potentially do SQL query
-
- 14 Mar, 2016 2 commits
-
-
Kamil Trzcinski authored
- Remove unused Gitlab::Application.routes.url_helpers from Ci::Build - Remove too much logic from a view, use Ci::Commit.matrix_builds - Use ci_status_with_icon - Don't describe symbols
-
Kamil Trzcinski authored
- Remove all view related methods from Ci::Build and CommitStatus - Remove unused Ci::Commit and Ci::Build methods - Use polymorphism to render different types of CommitStatus
-
- 12 Mar, 2016 4 commits
-
-
tiagonbotelho authored
-
tiagonbotelho authored
-
tiagonbotelho authored
-
Yorick Peterse authored
GitLab EE adds an extra relation that selects a "project_id" column instead of an "id" column, making it very hard for this method to be re-used in EE. Since using User#authorized_groups in ProjectsFinder#all_groups apparently has no performance impact we can just use it and keep everything compatible with EE.
-
- 11 Mar, 2016 20 commits
-
-
Robert Speicher authored
-
Robert Speicher authored
It's unclear how these blank values got added, but GitLab.com had a few: ``` irb(main):002:0> Note.where("line_code IS NOT NULL AND line_code = ''").count => 439 ``` We've added a migration to convert any existing records to use a NULL value when blank, and updated Note to set blank values to nil before validation.
-
Yorick Peterse authored
The OR condition for source_project_id/target_project_id leads to a query plan that performs rather poorly on PostgreSQL due to the use of sub-queries. Because Rails offers no easy alternative for this particular problem we're forced to using a UNION for both conditions. The resulting query performs much faster than just using an OR.
-
Yorick Peterse authored
This ensures searching namespaces works exactly the same as searching for any other resource.
-
Yorick Peterse authored
We can just use "arel_table" in these cases instead of "SomeClass.arel_table".
-
Yorick Peterse authored
We don't need the extra layer of nesting of UNION queries here (as User#authorized_projects already returns a UNION'd query).
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
Previously this used a regular LIKE which is case-sensitive on PostgreSQL. This ensures that for both PostgreSQL and MySQL the searching is case-insensitive similar to searching for projects.
-
Yorick Peterse authored
Similar to the changes made to Project.search the method Project.search_by_title now also uses Arel so it can automatically use ILIKE/LIKE instead of the lower() function.
-
Yorick Peterse authored
This chance is broken up in two steps: 1. Use ILIKE on PostgreSQL and LIKE on MySQL, instead of using "WHERE lower(x) LIKE lower(y)" as ILIKE is significantly faster than using lower(). In many cases the use of lower() will force a slow sequence scan. 2. Instead of using 1 query that searches both projects and namespaces using a JOIN we're using 2 separate queries that are UNION'd together. Using a JOIN would force a slow sequence scan, using a UNION avoids this. This method now uses Arel as Arel automatically uses ILIKE on PostgreSQL and LIKE on MySQL, removing the need to handle this manually.
-
Dmitriy Zaporozhets authored
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
Dmitriy Zaporozhets authored
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
Dmitriy Zaporozhets authored
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
Dmitriy Zaporozhets authored
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
Dmitriy Zaporozhets authored
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
- 10 Mar, 2016 2 commits
-
-
Yorick Peterse authored
The method Project#ci_services would load all services into memory (including _all_ their columns) and then use Enumerable#select to reduce the list. Project#ci_service in turn would further reduce this list down to just 1 Service instance. Instead of doing all this in Ruby we can just offload the work to the database, reducing the amount of time spent in these methods. These changes reduce the time of the first call to Project#ci_services from around 240 ms to around 10 ms, though the final timings will vary based on database load. Because Project#ci_service is memoized there's no further overhead introduced by using a database query. Fixes gitlab-org/gitlab-ce#14186
-
Jacob Vosmaer authored
-
- 09 Mar, 2016 2 commits
-
-
Yorick Peterse authored
This fixes the remainder of the GitPushService specs.
-
Douglas Barbosa Alexandre authored
-