An error occurred fetching the project authors.
- 26 Feb, 2018 1 commit
-
-
Andreas Brandl authored
Note that `ghost IS NOT TRUE` is equivalent to `ghost = 'f' OR ghost is null`: (true), (false), (NULL)) AS t (flag); flag | ?column? | ?column? ------+----------+---------- t | f | f f | t | t | t | t (3 rows) This makes it a little easier to create partial indexes for this (as only one condition is needed). Closes #43304.
-
- 22 Feb, 2018 1 commit
-
-
Yorick Peterse authored
This optimises searching for users when using queries consisting out of one or two characters such as "ab". We optimise such cases by searching for `LOWER(name)` and `LOWER(username)` instead of using `ILIKE`. Using `LOWER` produces a _much_ better performing query. For example, when searching for all users matching the term "a" we'd produce the following plan: Limit (cost=637.69..637.74 rows=20 width=805) (actual time=41.983..41.995 rows=20 loops=1) Buffers: shared hit=8330 -> Sort (cost=637.69..638.61 rows=368 width=805) (actual time=41.982..41.990 rows=20 loops=1) Sort Key: (CASE WHEN ((name)::text = 'a'::text) THEN 0 WHEN ((username)::text = 'a'::text) THEN 1 WHEN ((email)::text = 'a'::text) THEN 2 ELSE 3 END), name Sort Method: top-N heapsort Memory: 35kB Buffers: shared hit=8330 -> Bitmap Heap Scan on users (cost=75.47..627.89 rows=368 width=805) (actual time=9.452..41.305 rows=277 loops=1) Recheck Cond: (((name)::text ~~* 'a'::text) OR ((username)::text ~~* 'a'::text) OR ((email)::text = 'a'::text)) Rows Removed by Index Recheck: 7601 Heap Blocks: exact=7636 Buffers: shared hit=8327 -> BitmapOr (cost=75.47..75.47 rows=368 width=0) (actual time=8.290..8.290 rows=0 loops=1) Buffers: shared hit=691 -> Bitmap Index Scan on index_users_on_name_trigram (cost=0.00..38.85 rows=180 width=0) (actual time=4.369..4.369 rows=4071 loops=1) Index Cond: ((name)::text ~~* 'a'::text) Buffers: shared hit=360 -> Bitmap Index Scan on index_users_on_username_trigram (cost=0.00..34.41 rows=188 width=0) (actual time=3.896..3.896 rows=4140 loops=1) Index Cond: ((username)::text ~~* 'a'::text) Buffers: shared hit=328 -> Bitmap Index Scan on users_email_key (cost=0.00..1.94 rows=1 width=0) (actual time=0.022..0.022 rows=0 loops=1) Index Cond: ((email)::text = 'a'::text) Buffers: shared hit=3 Planning time: 3.912 ms Execution time: 42.171 ms With the changes in this commit we now produce the following plan instead: Limit (cost=13257.48..13257.53 rows=20 width=805) (actual time=1.567..1.579 rows=20 loops=1) Buffers: shared hit=287 -> Sort (cost=13257.48..13280.93 rows=9379 width=805) (actual time=1.567..1.572 rows=20 loops=1) Sort Key: (CASE WHEN ((name)::text = 'a'::text) THEN 0 WHEN ((username)::text = 'a'::text) THEN 1 WHEN ((email)::text = 'a'::text) THEN 2 ELSE 3 END), name Sort Method: top-N heapsort Memory: 35kB Buffers: shared hit=287 -> Bitmap Heap Scan on users (cost=135.66..13007.91 rows=9379 width=805) (actual time=0.194..1.107 rows=277 loops=1) Recheck Cond: ((lower((name)::text) = 'a'::text) OR (lower((username)::text) = 'a'::text) OR ((email)::text = 'a'::text)) Heap Blocks: exact=277 Buffers: shared hit=287 -> BitmapOr (cost=135.66..135.66 rows=9379 width=0) (actual time=0.152..0.152 rows=0 loops=1) Buffers: shared hit=10 -> Bitmap Index Scan on yorick_test_users (cost=0.00..124.75 rows=9377 width=0) (actual time=0.101..0.101 rows=277 loops=1) Index Cond: (lower((name)::text) = 'a'::text) Buffers: shared hit=4 -> Bitmap Index Scan on index_on_users_lower_username (cost=0.00..1.94 rows=1 width=0) (actual time=0.035..0.035 rows=1 loops=1) Index Cond: (lower((username)::text) = 'a'::text) Buffers: shared hit=3 -> Bitmap Index Scan on users_email_key (cost=0.00..1.94 rows=1 width=0) (actual time=0.014..0.014 rows=0 loops=1) Index Cond: ((email)::text = 'a'::text) Buffers: shared hit=3 Planning time: 0.303 ms Execution time: 1.687 ms Here we can see the new query is 25 times faster compared to the old query.
-
- 18 Feb, 2018 1 commit
-
-
Stan Hu authored
With Geo, attempting to view an endpoint with a user could result in an Error 500 since Devise attempts to update the last sign-in IP and other details. Closes gitlab-org/gitlab-ee#4972
-
- 13 Feb, 2018 1 commit
-
-
Peter Lauck authored
As per the discussion with @psimyn, this change does not affect the frontend, so user input will not be validated on the signin screen. Instead, the value sent to the backend has leading and trailing whitespace stripped before looking up the user with find_by. Closes #42637
-
- 08 Feb, 2018 1 commit
-
-
Hassan Zamani authored
-
- 06 Feb, 2018 3 commits
-
-
Douwe Maan authored
-
Douwe Maan authored
-
Douwe Maan authored
-
- 05 Feb, 2018 2 commits
-
-
Poornima authored
Removing last_sign_in_at in specs
-
Andreas Brandl authored
Fixes #32282.
-
- 02 Feb, 2018 2 commits
-
-
Matija Čupić authored
-
Mario de la Ossa authored
-
- 01 Feb, 2018 1 commit
-
-
Micaël Bergeron authored
-
- 31 Jan, 2018 1 commit
-
-
Takuya Noguchi authored
-
- 26 Jan, 2018 1 commit
-
-
Matija Čupić authored
-
- 21 Jan, 2018 1 commit
-
-
Mark Fletcher authored
Given no search term, the `search` and `search_with_secondary_emails` methods will yield an empty result set
-
- 15 Jan, 2018 1 commit
-
-
Stan Hu authored
Closes #41633
-
- 02 Jan, 2018 1 commit
-
-
Francisco Javier López authored
-
- 30 Dec, 2017 1 commit
-
-
Mario de la Ossa authored
This change is required because otherwise if a user is created with a value for `projects_limit` that matches the DB default, it gets overwritten by `current_application_settings.default_projects_limit`. By removing the default we once again can allow a user to be created with a limit of 10 projects without the risk that it'll change to 10000
-
- 19 Dec, 2017 1 commit
-
-
Robert Speicher authored
-
- 15 Dec, 2017 1 commit
-
-
Douwe Maan authored
-
- 11 Dec, 2017 1 commit
-
-
Douwe Maan authored
-
- 08 Dec, 2017 2 commits
-
-
Douwe Maan authored
(10.2) Avoid partial partial email adresses for matching See merge request gitlab/gitlabhq!2232 (cherry picked from commit 081aa1e91a777c9acb31be4a1e76b3dd7032fa9a) There are unresolved conflicts in app/models/user.rb. fa85a3fd Don't allow searching for partial user emails
-
Brett Walker authored
assigned_open_merge_requests_count and assigned_open_issues_count, which are used in the top header stats. Also important for a Geo secondary, so that the pending todo stat gets updated on the same frequency as the users open issues/merge requests.
-
- 07 Dec, 2017 1 commit
-
-
Mike Greiling authored
-
- 05 Dec, 2017 1 commit
-
-
Douwe Maan authored
-
- 04 Dec, 2017 1 commit
-
-
Francisco Javier López authored
-
- 01 Dec, 2017 1 commit
-
-
Francisco Lopez authored
Comments from code review applied. Also switched forked_from_project and ForkedProjectLinks to ForkNetworkMember
-
- 27 Nov, 2017 1 commit
-
-
Douwe Maan authored
-
- 24 Nov, 2017 1 commit
-
-
Douwe Maan authored
-
- 23 Nov, 2017 2 commits
-
-
Markus Koller authored
-
Jarka Kadlecova authored
-
- 21 Nov, 2017 1 commit
-
-
Daniel Juarez authored
-
- 17 Nov, 2017 1 commit
-
-
Francisco Javier López authored
-
- 16 Nov, 2017 2 commits
-
-
Jacopo authored
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
-
Yorick Peterse authored
By caching the number of personal SSH keys we reduce the number of queries necessary on pages such as ProjectsController#show (which can end up querying this data multiple times). The cache is refreshed/flushed whenever an SSH key is added, removed, or when a user is removed.
-
- 14 Nov, 2017 1 commit
-
-
Bob Van Landuyt authored
These dropdown options are used for creating and transfering projects.
-
- 07 Nov, 2017 2 commits
-
-
Yorick Peterse authored
Prior to this MR there were two GitHub related importers: * Github::Import: the main importer used for GitHub projects * Gitlab::GithubImport: importer that's somewhat confusingly used for importing Gitea projects (apparently they have a compatible API) This MR renames the Gitea importer to Gitlab::LegacyGithubImport and introduces a new GitHub importer in the Gitlab::GithubImport namespace. This new GitHub importer uses Sidekiq for importing multiple resources in parallel, though it also has the ability to import data sequentially should this be necessary. The new code is spread across the following directories: * lib/gitlab/github_import: this directory contains most of the importer code such as the classes used for importing resources. * app/workers/gitlab/github_import: this directory contains the Sidekiq workers, most of which simply use the code from the directory above. * app/workers/concerns/gitlab/github_import: this directory provides a few modules that are included in every GitHub importer worker. == Stages The import work is divided into separate stages, with each stage importing a specific set of data. Stages will schedule the work that needs to be performed, followed by scheduling a job for the "AdvanceStageWorker" worker. This worker will periodically check if all work is completed and schedule the next stage if this is the case. If work is not yet completed this worker will reschedule itself. Using this approach we don't have to block threads by calling `sleep()`, as doing so for large projects could block the thread from doing any work for many hours. == Retrying Work Workers will reschedule themselves whenever necessary. For example, hitting the GitHub API's rate limit will result in jobs rescheduling themselves. These jobs are not processed until the rate limit has been reset. == User Lookups Part of the importing process involves looking up user details in the GitHub API so we can map them to GitLab users. The old importer used an in-memory cache, but this obviously doesn't work when the work is spread across different threads. The new importer uses a Redis cache and makes sure we only perform API/database calls if absolutely necessary. Frequently used keys are refreshed, and lookup misses are also cached; removing the need for performing API/database calls if we know we don't have the data we're looking for. == Performance & Models The new importer in various places uses raw INSERT statements (as generated by `Gitlab::Database.bulk_insert`) instead of using Rails models. This allows us to bypass any validations and callbacks, drastically reducing the number of SQL queries and Gitaly RPC calls necessary to import projects. To ensure the code produces valid data the corresponding tests check if the produced rows are valid according to the model validation rules.
-
Yorick Peterse authored
By using SQL::Union we can return a proper ActiveRecord::Relation, making it possible to select the columns we're interested in (instead of all of them).
-
- 06 Nov, 2017 1 commit
-
-
Douwe Maan authored
-