- Aug 01, 2018
-
-
Zeger-Jan van de Weg authored
Our friends at GitHub show the programming languages for a long time, and inspired by that this commit means to create about the same functionality. Language detection is done through Linguist, as before, where the difference is that we cache the result in the database. Also, Gitaly can incrementaly scan a repository. This is done through a shell out, which creates overhead of about 3s each run. For now this won't be improved. Scans are triggered by pushed to the default branch, usually `master`. However, one exception to this rule the charts page. If we're requesting this expensive data anyway, we just cache it in the database. Edge cases where there is no repository, or its empty are caught in the Repository model. This makes use of Redis caching, which is probably already loaded. The added model is called RepositoryLanguage, which will make it harder if/when GitLab supports multiple repositories per project. However, for now I think this shouldn't be a concern. Also, Language could be confused with the i18n languages and felt like the current name was suiteable too. Design of the Project#Show page is done with help from @dimitrieh. This change is not visible to the end user unless detections are done.
-
- Jul 30, 2018
-
-
Jarka Kadlecova authored
-
- Jul 18, 2018
-
-
Imre (Admin) authored
-
- Jun 24, 2018
-
-
Oswaldo Ferreir authored
-
- May 24, 2018
-
-
Oswaldo Ferreir authored
We request Gitaly in a N+1 manner to build discussion diffs. Once the diffs are from different revisions, it's hard to make a single request to the service in order to build the whole response. With this change we solve this problem and simplify a lot fetching this piece of info.
-
- May 07, 2018
-
-
Tiago Botelho authored
-
- Mar 30, 2018
-
-
Sean McGivern authored
Also, refactor the mail sending slightly: instead of one worker sending all emails, create a worker per project with issues due, which will send all emails for that project.
-
- Mar 26, 2018
-
-
Stuart Nelson authored
-
Stuart Nelson authored
-
- Mar 22, 2018
-
-
Micael Bergeron authored
-
- Mar 06, 2018
-
-
Shinya Maeda authored
Integrate two workers into one ArchiveTraceWorker with pipeline_background queue. This queue takes loqer precedence than pipeline_default.
-
Shinya Maeda authored
-
- Mar 01, 2018
-
-
Micael Bergeron authored
-
Micael Bergeron authored
-
- Feb 28, 2018
-
-
Douwe Maan authored
Can migrate LFS objects to S3 style object storage Closes #2841 See merge request !2760
-
- Feb 26, 2018
-
-
Dmitriy Zaporozhets authored
Signed-off-by:
Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
- Feb 23, 2018
-
-
Nick Thomas authored
-
- Jan 06, 2018
-
-
Matija Čupić authored
-
- Dec 16, 2017
-
-
Matija Čupić authored
-
- Dec 13, 2017
-
-
Douwe Maan authored
-
- Dec 12, 2017
-
-
Douwe Maan authored
-
- Nov 28, 2017
-
- Nov 07, 2017
-
-
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.
-
- Oct 03, 2017
-
-
Kamil Trzcińśki authored
-
Shinya Maeda authored
-
- Sep 30, 2017
-
-
Shinya Maeda authored
-
- Sep 28, 2017
-
-
- Sep 20, 2017
-
-
Yorick Peterse authored
This makes things simpler as no scheduling is involved. Further we remove the need for running a SELECT + UPDATE just to get the key and update it, whereas we only need an UPDATE when setting last_used_at directly in a request. The added service class takes care of updating Key#last_used_at without using Sidekiq. Further it makes sure we only try to obtain a Redis lease if we're confident that we actually need to do so, instead of always obtaining it. We also make sure to _only_ update last_used_at instead of also updating updated_at. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36663
-
- Aug 21, 2017
-
-
Grzegorz Bizon authored
-
Grzegorz Bizon authored
-
Grzegorz Bizon authored
-
Grzegorz Bizon authored
-
Grzegorz Bizon authored
-
- Aug 07, 2017
-
-
Jarka Kadlecova authored
-
- Jul 27, 2017
-
-
Alexis Reigel authored
-
Alexis Reigel authored
-
- Jun 12, 2017
-
-
Yorick Peterse authored
Background migrations can be used to perform long running data migrations without these blocking a deployment procedure. See MR https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11854 for more information.
-
- May 25, 2017
-
-
Alexander Randa authored
* implemented logging of project and system web hooks * implemented UI for user area (project hooks) * implemented UI for admin area (system hooks) * implemented retry of logged webhook * NOT imeplemented log remover
-
- May 10, 2017
-
-
Toon Claes authored
Destroying projects can be very time consuming. So instead of destroying them in the post-deploy, just schedule them and make Sidekiq do the hard work. They are scheduled in batches of 5000 records. This way the number of database requests is limited while also the amount data read to memory is limited.
-
- May 05, 2017
-
-
James Lopez authored
-