summaryrefslogtreecommitdiff
path: root/app/workers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'feature/system_hook_push' into 'master' Dmitriy Zaporozhets2016-04-191-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | Added System Hooks for push and tag_push Implements `push` and `tag_push` events for System Hooks. They are based on Webhooks Events but without any deprecated item. We don't send commits too. We are implementing this, to be used by Geo repository syncing (gitlab-org/gitlab-ee#76). These hook events will be sent only when the respective configuration flags are set to true. UI changes to admin screen will be made in another MR. See merge request !3744
| * Refactor GitTagPushService and fig tags_push system event hookGabriel Mazetto2016-04-191-2/+2
| |
* | When a project wiki is disabled skip it for fsckJacob Vosmaer2016-04-181-3/+3
|/
* Shut up, RubocopRobert Speicher2016-04-141-3/+3
|
* Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into auto-fsckJacob Vosmaer2016-04-131-1/+1
|\
| * Fix high CPU usage when PostReceive receives refs/merge-requests/<id>push-refKamil Trzcinski2016-04-111-1/+1
| |
* | Use more conservative limitsJacob Vosmaer2016-04-132-3/+3
| |
* | Clear repository check columns asynchronouslyJacob Vosmaer2016-04-135-95/+116
| |
* | Always check the wiki tooJacob Vosmaer2016-04-131-2/+3
| |
* | More code changes, thanks RobertJacob Vosmaer2016-04-132-20/+24
| |
* | Changes suggested by RobertJacob Vosmaer2016-04-121-1/+1
| |
* | Add a 'circuit breaker' for repo checksJacob Vosmaer2016-04-121-0/+8
| |
* | Increase fsck lock timeout to 24 hoursJacob Vosmaer2016-04-121-1/+3
| |
* | Rename almost all the thingsJacob Vosmaer2016-04-063-14/+14
| |
* | Rebase repo check MRJacob Vosmaer2016-04-043-0/+92
|/
* Exclude projects pending deletion from all resultsZeger-Jan van de Weg2016-03-311-1/+1
|
* Check if repo exists before attempting to update cache infoStan Hu2016-03-271-0/+3
| | | | Closes #14361
* Cache output of Repository#exists?Yorick Peterse2016-03-191-2/+3
| | | | | | | | | This caches the output of Repository#exists? in Redis while making sure it's flushed properly when creating new repositories, deleting them, etc. For the ProjectWiki tests to work I had to make ProjectWiki#create_repo! public as testing private methods in RSpec is a bit of a pain.
* Merge branch 'no-gc-retry' into 'master' Robert Speicher2016-03-181-0/+10
|\ | | | | | | | | | | | | | | Do not retry "git gc" To prevent 'git gc' timing out on a large repo and then bouncing around in the retry queue. See merge request !3266
| * Do not retry "git gc"Jacob Vosmaer2016-03-171-0/+10
| |
* | Back-porting PostReceive refactor made for EE 🍺Gabriel Mazetto2016-03-171-27/+19
| |
* | Add ability to delete a user with forceZeger-Jan van de Weg2016-03-151-2/+2
| |
* | A worker deletes a user, so the request doesn't time outZeger-Jan van de Weg2016-03-151-0/+10
|/ | | | Fixes #13261
* Use Gitlab::Git::DiffCollectionsJacob Vosmaer2016-03-031-1/+1
|
* Moved cache expiration code to Repository hooksYorick Peterse2016-02-232-2/+2
| | | | | This keeps all the cache expiration code in a single file/class instead of spreading it all across the codebase.
* Merge branch 'fix/gitpushservice-complexity-issue' into 'master' Douwe Maan2016-02-181-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce code complexity on GitPushService#execute Code complexity for gitlab-ce after this has been refactored: ``` 27.3: GitPushService#execute ``` This still needs to be merged into `gitlab-ee` presumably with conflicts... Perhaps we should create another issue for doing that? I left the code sort of similar to what it was... If I could, I would have refactored most of the code into separate classes, etc. as it breaks probably all SOLID principles. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/13327 See merge request !2784
| * refactored some stuff based on MR feedbackJames Lopez2016-02-171-6/+1
| |
| * refactored GitPushService and updated specJames Lopez2016-02-151-1/+6
| |
| * attempt to reduce code complexity on GitPushService#executeJames Lopez2016-02-111-1/+1
| |
* | Expire caches after forking/importing a repositoryYorick Peterse2016-02-172-0/+2
|/ | | | | | | | This ensures the caches for Repository#empty? and Repository#has_visible_content? are flushed after a repository has been imported or forked. Fixes gitlab-org/gitlab-ce#13505
* First pass at deleting projects in the background.Josh Frye2016-01-291-0/+17
|
* [WIP] Background process note logic for #3948Josh Frye2016-01-281-0/+12
|
* Extract Projects::ImportService service from RepositoryImportWorkerDouglas Barbosa Alexandre2016-01-251-39/+7
|
* Write to InfluxDB directly via UDPYorick Peterse2015-12-291-33/+0
| | | | | | | | | | | | | This removes the need for Sidekiq and any overhead/problems introduced by TCP. There are a few things to take into account: 1. When writing data to InfluxDB you may still get an error if the server becomes unavailable during the write. Because of this we're catching all exceptions and just ignore them (for now). 2. Writing via UDP apparently requires the timestamp to be in nanoseconds. Without this data either isn't written properly. 3. Due to the restrictions on UDP buffer sizes we're writing metrics one by one, instead of writing all of them at once.
* Drop empty tag values from metricsYorick Peterse2015-12-171-1/+5
| | | | | InfluxDB throws an error when trying to store a list of tags where one or more have an empty value.
* Cast values to strings before escaping themYorick Peterse2015-12-171-1/+1
| | | | | This ensures that e.g. line numbers used in tags are first casted to strings.
* Storing of application metrics in InfluxDBYorick Peterse2015-12-171-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to write application metrics (e.g. SQL timings) to InfluxDB. These metrics can in turn be visualized using Grafana, or really anything else that can read from InfluxDB. These metrics can be used to track application performance over time, between different Ruby versions, different GitLab versions, etc. == Transaction Metrics Currently the following is tracked on a per transaction basis (a transaction is a Rails request or a single Sidekiq job): * Timings per query along with the raw (obfuscated) SQL and information about what file the query originated from. * Timings per view along with the path of the view and information about what file triggered the rendering process. * The duration of a request itself along with the controller/worker class and method name. * The duration of any instrumented method calls (more below). == Sampled Metrics Certain metrics can't be directly associated with a transaction. For example, a process' total memory usage is unrelated to any running transactions. While a transaction can result in the memory usage going up there's no accurate way to determine what transaction is to blame, this becomes especially problematic in multi-threaded environments. To solve this problem there's a separate thread that takes samples at a fixed interval. This thread (using the class Gitlab::Metrics::Sampler) currently tracks the following: * The process' total memory usage. * The number of file descriptors opened by the process. * The amount of Ruby objects (using ObjectSpace.count_objects). * GC statistics such as timings, heap slots, etc. The default/current interval is 15 seconds, any smaller interval might put too much pressure on InfluxDB (especially when running dozens of processes). == Method Instrumentation While currently not yet used methods can be instrumented to track how long they take to run. Unlike the likes of New Relic this doesn't require modifying the source code (e.g. including modules), it all happens from the outside. For example, to track `User.by_login` we'd add the following code somewhere in an initializer: Gitlab::Metrics::Instrumentation. instrument_method(User, :by_login) to instead instrument an instance method: Gitlab::Metrics::Instrumentation. instrument_instance_method(User, :save) Instrumentation for either all public model methods or a few crucial ones will be added in the near future, I simply haven't gotten to doing so just yet. == Configuration By default metrics are disabled. This means users don't have to bother setting anything up if they don't want to. Metrics can be enabled by editing one's gitlab.yml configuration file (see config/gitlab.yml.example for example settings). == Writing Data To InfluxDB Because InfluxDB is still a fairly young product I expect the worse. Data loss, unexpected reboots, the database not responding, you name it. Because of this data is _not_ written to InfluxDB directly, instead it's queued and processed by Sidekiq. This ensures that users won't notice anything when InfluxDB is giving trouble. The metrics worker can be started in a standalone manner as following: bundle exec sidekiq -q metrics The corresponding class is called MetricsWorker.
* Migrate CI WebHooks and Emails to new tablesKamil Trzcinski2015-12-101-1/+1
|
* Migrate CI::Services and CI::WebHooks to Services and WebHooksKamil Trzcinski2015-12-104-38/+19
|
* Merge branch 'master' into zj/gitlab-ce-merge-if-greenDouwe Maan2015-12-081-3/+0
|\
| * Migrate from Sidetiq to Sidekiq-cronfeature/sidekiq-cronGabriel Mazetto2015-12-041-3/+0
| | | | | | | | Updated Sidekiq to 3.5.x
* | Merge branch 'master' into merge-if-greenZeger-Jan van de Weg2015-12-075-35/+48
|\ \ | |/
| * fix specsrails_update_to_4_2Valery Sizov2015-11-301-1/+1
| |
| * Migrate mailers to ActiveJobValery Sizov2015-11-261-1/+1
| |
| * Rails update to 4.2.4Valery Sizov2015-11-251-1/+1
| |
| * Fix 500 when using CIci-fix-500Kamil Trzcinski2015-11-231-0/+3
| | | | | | | | | | | | - Fix for Ci::Build state machine, allowing to process builds without the project - Forcefully update builds that didn't want to update with state machine - Fix saving GitLabCiService as Admin Template
| * Remove accidentally added line. #3598issue_3598Rubén Dávila2015-11-201-3/+0
| | | | | | | | It should exist in EE only.
| * Remove unused variable in repository importDouwe Maan2015-11-181-1/+1
| |
| * Store and show reason why import failed.Douwe Maan2015-11-182-34/+47
| |
* | Merge branch 'master' into merge-if-greenZeger-Jan van de Weg2015-11-181-0/+18
|\ \ | |/