summaryrefslogtreecommitdiff
path: root/app/workers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '29492-useless-queries' into 'master'Sean McGivern2017-04-041-0/+2
|\ | | | | | | | | | | | | remove useless queries with false conditions (e.g 1=0) Closes #29492 See merge request !10141
| * Remove useless queries with false conditions (e.g 1=0)mhasbini2017-04-041-0/+2
| |
* | Remove unused include from RepositoryImportWorkerDouglas Barbosa Alexandre2017-04-031-1/+0
|/
* Helper method for storage path strippingJacob Vosmaer2017-03-291-8/+4
|
* All CI offline migrationsKamil Trzciński2017-03-171-20/+0
|
* adds queue option to push bulk in authorized projects worker29137-bulk-perform-async-should-specify-queueTiago Botelho2017-03-101-1/+1
|
* Merge branch '28447-hybrid-repository-storages' into 'master' Sean McGivern2017-03-071-2/+2
|\ | | | | | | | | Update storage settings to allow extra values per shard See merge request !9597
| * Update storage settings to allow extra values per shard28447-hybrid-repository-storagesAlejandro Rodríguez2017-03-031-2/+2
| | | | | | | | | | | | | | This will be necessary when adding gitaly settings. This version doesn't make any functional changes, but allows us to include this breaking change in 9.0 and add the needed extra settings in the future with backwards compatibility
* | Moved call of SystemHooksService from UpdateMergeRequestsWorker to ↵gpongelli2017-03-072-3/+8
| | | | | | | | GitPushServic…
* | Add Upload model and UploadChecksumWorker workerRobert Speicher2017-03-061-0/+12
| |
* | Renable StuckCiBuildsWorker to StucjCiJobsWorker27523-make-stuck-build-detection-more-performantTomasz Maczukin2017-03-031-1/+1
| |
* | Make 'joins' line shorterTomasz Maczukin2017-03-011-1/+1
| |
* | Fix rubocop offensesTomasz Maczukin2017-03-011-5/+2
| |
* | Add minor updatesTomasz Maczukin2017-03-011-5/+13
| |
* | Improve builds search queryTomasz Maczukin2017-03-011-1/+1
| |
* | Add Gitlab::OptimisticLocking for build droppingTomasz Maczukin2017-03-011-1/+3
| |
* | Add exclusive lease for stuck_ci_builds_workerTomasz Maczukin2017-03-011-2/+11
| |
* | Update stuck and outdated builds cleanup workerTomasz Maczukin2017-03-011-7/+31
|/
* Revert "Enable Style/DotPosition"Douwe Maan2017-02-238-21/+21
| | | | | | | | | | | | | | | This reverts commit e00fb2bdc2090e9cabeb1eb35a2672a882cc96e9. # Conflicts: # .rubocop.yml # .rubocop_todo.yml # lib/gitlab/ci/config/entry/global.rb # lib/gitlab/ci/config/entry/jobs.rb # spec/lib/gitlab/ci/config/entry/factory_spec.rb # spec/lib/gitlab/ci/config/entry/global_spec.rb # spec/lib/gitlab/ci/config/entry/job_spec.rb # spec/lib/gitlab/ci/status/build/factory_spec.rb # spec/lib/gitlab/incoming_email_spec.rb
* Revert "Prefer leading style for Style/DotPosition"Douwe Maan2017-02-2313-38/+38
| | | | This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
* Manually correct autocorrectDouwe Maan2017-02-231-2/+2
|
* Prefer leading style for Style/DotPositionDouwe Maan2017-02-2313-38/+38
|
* Enable Style/ColonMethodCallDouwe Maan2017-02-231-3/+3
|
* Enable Style/DotPositionDouwe Maan2017-02-238-21/+21
|
* Add user deletion permission check in `Users::DestroyService`sh-delete-user-permission-checkStan Hu2017-02-201-0/+2
| | | | | | | | | We saw from a recent incident that the `Users::DestroyService` would attempt to delete a user over and over. Revoking the permissions from the current user did not help. We should ensure that the current user does, in fact, have permissions to delete the user. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch 'zj-drop-ruby-21-tests' into 'master' Rémy Coutable2017-02-131-1/+1
|\ | | | | | | | | Update Rubocop to Ruby 2.3 See merge request !8994
| * Update Rubocop to ruby 2.3zj-drop-ruby-21-testsZ.J. van de Weg2017-02-071-1/+1
| |
* | Fix inconsistent naming for services that delete thingsdixpac2017-02-082-2/+2
| | | | | | | | | | | | * Changed name of delete_user_service and worker to destroy * Move and change delete_group_service to Groups::DestroyService * Rename Notes::DeleteService to Notes::DestroyService
* | Merge branch 'master' into jej-pages-picked-from-eeJames Edwards-Jones2017-02-031-2/+4
|\ \ | |/
| * Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2017-01-264-2/+32
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix-git-hooks-when-creating-file * upstream/master: (1122 commits) Update CHANGELOG.md for 8.16.2 Display project ID in project settings (!8572) fixed points from comments to improve code quality Update CHANGELOG.md for 8.14.8 Statisfy eslint Add CHANGELOG entry Fix access to the wiki code via HTTP when repository feature disabled Display fullscreen button on small screens (!5302) Prevent removing fields from dropdowns on input elements fix for all themes Return struct instead of multiple values Fix race conditions for AuthorizedProjectsWorker Add User#nested_groups and User#nested_projects methods Fix spec failure due to timestamp ordering issue in mySQL Fixed error with filter keyboard tests `can?` already includes the `feature_available?` check Test there is no Merge Request button when MRs are disabled Ensure the correct Merge Request button is found Add 409 conflict tests Add CHANGELOG ...
| * | Prefer leading dots over trailing dotsLin Jen-Shin2017-01-051-4/+4
| | |
| * | Merge branch 'master' into fix-git-hooks-when-creating-fileLin Jen-Shin2017-01-043-32/+28
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (1031 commits) Add changelog entry for renaming API param [ci skip] Add missing milestone parameter Refactor issues filter in API Fix project hooks params Gitlab::LDAP::Person uses LDAP attributes configuration Don't delete files from spec/fixtures Copy, don't move uploaded avatar files Minor improvements to changelog docs Rename logo, apply for Slack too Fix Gemfile.lock for the octokit update Fix cross-project references copy to include the project reference Add logo in public files Use stable icon for Mattermost integration rewrite the item.respond_to?(:x?) && item.x? to item.try(:x?) API: extern_uid is a string Increases pipeline graph drowdown width in order to prevent strange position on chrome on ubuntu Removed bottom padding from merge manually from CLI because of repositioning award emoji's Make haml_lint happy Improve spec Add feature tests for Cycle Analytics ...
| * \ \ Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2016-12-081-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix-git-hooks-when-creating-file * upstream/master: (116 commits) adds impersonator variable and makes sudo usage overall more clear Reenables /user API request to return private-token if user is admin and requested with sudo Fix Backup::Manager#remove_old Allow public access to some Tag API endpoints Update outdated visible content spec descriptions Grapify the issues API new DevOps report, 404s, typos Remove dashboard.scss Update custom_hooks.md for global custom hooks and chained hook info Move admin hooks spinach to rspec Move admin logs spinach test to rspec Fix 404 error when visit group label edit page A simpler implementation of finding a merge request Encourage bug reporters to mention if they use GitLab.com [ci skip] Bump gitlab-shell version to 4.0.3 Remove confirmation.scss Explain "js: true" in "deleted_source_branch_spec.rb" [ci skip] Move award emojis to framwork Move image styles to framework Remove tags.scss ...
| * | | | Introduce Repository#with_tmp_ref which we needLin Jen-Shin2016-12-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | commits from the other repository. We'll cleanup the tmp ref after we're done with our business.
* | | | | Initial work on GitLab Pages updateKamil Trzcinski2017-01-311-1/+5
| | | | |
* | | | | Move most of PagesWorker logic UpdatePagesServiceKamil Trzcinski2017-01-311-131/+2
| | | | |
* | | | | Asynchronously remove pagesKamil Trzcinski2017-01-311-1/+10
| | | | |
* | | | | Rename pages namespace or project path when changedKamil Trzcinski2017-01-311-4/+0
| | | | | | | | | | | | | | | | | | | | - Move UploadsTransfer to ProjectTransfer and inherit from this to UploadsTransfer and PagesTransfer
* | | | | Revert "Store pages in shared/pages/fqdn/fqdn/public or ↵Kamil Trzcinski2017-01-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shared/pages/fqdn/subpath/public - makes it simpler to implement CNAMEs in future" This reverts commit 86a2a78f0d13a678899460638add6b862059433e.
* | | | | Store pages in shared/pages/fqdn/fqdn/public or ↵Kamil Trzcinski2017-01-311-4/+0
| | | | | | | | | | | | | | | | | | | | shared/pages/fqdn/subpath/public - makes it simpler to implement CNAMEs in future
* | | | | Fix testsKamil Trzcinski2017-01-311-5/+11
| | | | |
* | | | | Split PagesWorkerKamil Trzcinski2017-01-311-40/+61
| | | | |
* | | | | Remove locking and add force to FileUtils methodsKamil Trzcinski2017-01-311-20/+12
| | | | |
* | | | | Fix specsKamil Trzcinski2017-01-311-1/+2
| | | | |
* | | | | Add GitLab PagesKamil Trzcinski2017-01-311-0/+123
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The pages are created when build artifacts for `pages` job are uploaded - Pages serve the content under: http://group.pages.domain.com/project - Pages can be used to serve the group page, special project named as host: group.pages.domain.com - User can provide own 403 and 404 error pages by creating 403.html and 404.html in group page project - Pages can be explicitly removed from the project by clicking Remove Pages in Project Settings - The size of pages is limited by Application Setting: max pages size, which limits the maximum size of unpacked archive (default: 100MB) - The public/ is extracted from artifacts and content is served as static pages - Pages asynchronous worker use `dd` to limit the unpacked tar size - Pages needs to be explicitly enabled and domain needs to be specified in gitlab.yml - Pages are part of backups - Pages notify the deployment status using Commit Status API - Pages use a new sidekiq queue: pages - Pages use a separate nginx config which needs to be explicitly added
* | | | Fix race conditions for AuthorizedProjectsWorkerrefresh-authorizations-fork-joinYorick Peterse2017-01-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two cases that could be problematic: 1. Because sometimes AuthorizedProjectsWorker would be scheduled in a transaction it was possible for a job to run/complete before a COMMIT; resulting in it either producing an error, or producing no new data. 2. When scheduling jobs the code would not wait until completion. This could lead to a user creating a project and then immediately trying to push to it. Usually this will work fine, but given enough load it might take a few seconds before a user has access. The first one is problematic, the second one is mostly just annoying (but annoying enough to warrant a solution). This commit changes two things to deal with this: 1. Sidekiq scheduling now takes places after a COMMIT, this is ensured by scheduling using Rails' after_commit hook instead of doing so in an arbitrary method. 2. When scheduling jobs the calling thread now waits for all jobs to complete. Solution 2 requires tracking of job completions. Sidekiq provides a way to find a job by its ID, but this involves scanning over the entire queue; something that is very in-efficient for large queues. As such a more efficient solution is necessary. There are two main Gems that can do this in a more efficient manner: * sidekiq-status * sidekiq_status No, this is not a joke. Both Gems do a similar thing (but slightly different), and the only difference in their name is a dash vs an underscore. Both Gems however provide far more than just checking if a job has been completed, and both have their problems. sidekiq-status does not appear to be actively maintained, with the last release being in 2015. It also has some issues during testing as API calls are not stubbed in any way. sidekiq_status on the other hand does not appear to be very popular, and introduces a similar amount of code. Because of this I opted to write a simple home grown solution. After all, all we need is storing a job ID somewhere so we can efficiently look it up; we don't need extra web UIs (as provided by sidekiq-status) or complex APIs to update progress, etc. This is where Gitlab::SidekiqStatus comes in handy. This namespace contains some code used for tracking, removing, and looking up job IDs; all without having to scan over an entire queue. Data is removed explicitly, but also expires automatically just in case. Using this API we can now schedule jobs in a fork-join like manner: we schedule the jobs in Sidekiq, process them in parallel, then wait for completion. By using Sidekiq we can leverage all the benefits such as being able to scale across multiple cores and hosts, retrying failed jobs, etc. The one downside is that we need to make sure we can deal with unexpected increases in job processing timings. To deal with this the class Gitlab::JobWaiter (used for waiting for jobs to complete) will only wait a number of seconds (30 by default). Once this timeout is reached it will simply return. For GitLab.com almost all AuthorizedProjectWorker jobs complete in seconds, only very rarely do we spike to job timings of around a minute. These in turn seem to be the result of external factors (e.g. deploys), in which case a user is most likely not able to use the system anyway. In short, this new solution should ensure that jobs are processed properly and that in almost all cases a user has access to their resources whenever they need to have access.
* | | | Merge remote-tracking branch 'origin/master' into 21698-redis-runner-last-buildKamil Trzcinski2017-01-194-32/+41
|\ \ \ \
| * | | | Merge branch '24185-legacy-ci-status-reactive-cache' into 'security'Robert Speicher2017-01-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ReactiveCaching to update external CI status asynchronously See https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2055
| * | | | Record and show last used date of SSH KeysVincent Wong2017-01-091-0/+13
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Addresses: Issue #13810 1. Adds a last_used_at attribute to the Key table/model 2. Update a key's last_used_at whenever it gets used 3. Display how long ago an ssh key was last used
| * | | Add more storage statisticsMarkus Koller2016-12-211-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds counters for build artifacts and LFS objects, and moves the preexisting repository_size and commit_count from the projects table into a new project_statistics table. The counters are displayed in the administration area for projects and groups, and also available through the API for admins (on */all) and normal users (on */owned) The statistics are updated through ProjectCacheWorker, which can now do more granular updates with the new :statistics argument.