summaryrefslogtreecommitdiff
path: root/spec/workers
Commit message (Collapse)AuthorAgeFilesLines
* Removes idenfitication by commit from Gitlab::Identifier51335-fail-early-when-user-cannot-be-identifiedTiago Botelho2018-10-251-0/+11
| | | | | | | Before we would need to identify a user when pushing through the GitLab UI. Since this is no longer the case we can remove the identification by commit and instead, use the identify_using_user
* User not defined in PostReceive#process_project_changesTiago Botelho2018-10-251-56/+68
| | | | | | | When Gitlab::GitPostReceive#changes_refs is empty user would not get defined and nil would be passed to PostReceive#after_project_changes_hooks which would then throw an error.
* Remove broken git storage for testingZeger-Jan van de Weg2018-10-231-1/+1
| | | | | | | | | | | Broken storage used to be used to test situations where the Git storage wasn't being reached. These days we can just mock the Gitaly response. But given the broken storage is removed now, Gitaly can take over control of the storage being reachable. If it's not, Gitaly won't boot. That's nice for situations where a disk wasn't mounted for instance. Gitaly MR: https://gitlab.com/gitlab-org/gitaly/merge_requests/675
* Remove the `ForkedProjectLink` modelBob Van Landuyt2018-10-193-22/+26
| | | | | | | | | | | | | | This removes the `ForkedProjectLink` model that has been replaced by the `ForkNetworkMember` and `ForkNetwork` combination. All existing relations have been adjusted to use these new models. The `forked_project_link` table has been dropped. The "Forks" count on the admin dashboard has been updated to count all `ForkNetworkMember` rows and deduct the number of `ForkNetwork` rows. This is because now the "root-project" of a fork network also has a `ForkNetworkMember` row. This count could become inaccurate when the root of a fork network is deleted.
* Merge branch 'increase-event-retention-prune-old-events-worker' into 'master'Douwe Maan2018-10-081-7/+13
|\ | | | | | | | | Prune events older than 2 years instead of 12 months See merge request gitlab-org/gitlab-ce!22145
| * Added new test and updated all event idsJeremy Watson2018-10-051-3/+8
| |
| * Renamed test eventsJeremy Watson2018-10-051-2/+3
| |
| * Updated existing spec for new 2 year timeframeJeremy Watson2018-10-051-3/+3
| |
* | Revert "Avoid conflicts between enumlator's schedule! method and state ↵Shinya Maeda2018-10-042-2/+2
| | | | | | | | | | | | machine's schedule! method" This reverts commit 10b09db46ddfdc6dfab55fa9671e716cd46a565b.
* | Avoid conflicts between enumlator's schedule! method and state machine's ↵Shinya Maeda2018-10-042-2/+2
| | | | | | | | schedule! method
* | Merge branch 'master-ce' into scheduled-manual-jobsShinya Maeda2018-10-042-6/+5
|\ \ | |/
| * Remove Gitlab::Git::Repository#rugged and Gollum codeAlejandro Rodríguez2018-10-022-6/+5
| | | | | | | | | | | | | | | | Cleanup code, and refactor tests that still use Rugged. After this, there should be no Rugged code that access the instance's repositories on non-test environments. There is still some rugged code for other tasks like the repository import task, but since it doesn't access any repository storage path it can stay.
* | Improve performance of stale scheduled builds searchShinya Maeda2018-10-031-1/+1
| |
* | Fix specShinya Maeda2018-10-021-1/+1
| |
* | Fix coding style offenceShinya Maeda2018-10-021-1/+1
| |
* | Fix StuckCiJobsWorker and added testsShinya Maeda2018-10-021-0/+41
| |
* | Add spec for BuildScheduleWorker and RunScheduledBuildServiceShinya Maeda2018-10-021-0/+40
|/
* Log project services errors when executing asyncFelipe Artur2018-09-101-0/+25
|
* Delete a container registry asynchronouslyStan Hu2018-09-071-0/+33
| | | | | | | | | | | | | When a container registry has many tags, it's easy for the DELETE call to take more than 60 seconds and fail. This can also leave the registry in a bad state with null bytes since some of the images have been deleted with tags still pointing to them. In addition, we have to prevent users from accidentally initiating the delete multiple times or this could leave the registry with orphaned tags. This commit also adds a flash message to notify the user the registry is scheduled for deletion. Closes #49926, #51063
* Automatically disable Auto DevOps for project upon first pipeline failureMayra Cabrera2018-09-061-0/+57
|
* Merge branch 'blacklist-destroy-all' into 'master'Robert Speicher2018-08-171-1/+1
|\ | | | | | | | | Blacklist the use of destroy_all See merge request gitlab-org/gitlab-ce!21250
| * Whitelist existing destroy_all offensesblacklist-destroy-allYorick Peterse2018-08-161-1/+1
| | | | | | | | This whitelists all existing places where we use "destroy_all".
* | Fix: Project deletion may not log audit events during user deletionValery Sizov2018-08-171-7/+0
|/
* Merge branch 'group-todos' into 'master'Sean McGivern2018-08-071-0/+12
|\ | | | | | | | | Group todos See merge request gitlab-org/gitlab-ce!20675
| * Remove group todos when a users looses accessJarka Kadlecová2018-08-021-0/+12
| |
* | Merge branch 'background-migrations-system-load' into 'master'Stan Hu2018-08-061-0/+52
|\ \ | | | | | | | | | | | | Respond to DB health in background migrations See merge request gitlab-org/gitlab-ce!20720
| * | Respond to DB health in background migrationsYorick Peterse2018-08-061-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the BackgroundMigration worker so it checks for the health of the DB before performing a background migration. This in turn allows us to reduce the minimum interval, without having to worry about blowing things up if we schedule too many migrations. In this setup, the BackgroundMigration worker will reschedule jobs as long as the database is considered to be in an unhealthy state. Once the database has recovered, the migration can be performed. To determine if the database is in a healthy state, we look at the replication lag of any replication slots defined on the primary. If the lag is deemed to great (100 MB by default) for too many slots, the migration is rescheduled for a later point in time. The health checking code is hidden behind a feature flag, allowing us to disable it if necessary.
* | | Resolve "Hashed storage: extend "Enable hashed storage for all new projects" ↵Valery Sizov2018-08-031-1/+1
| | | | | | | | | | | | to "for all new and renamed projects""
* | | Merge branch 'sh-fix-failing-gpg-signature-ce' into 'master'Robert Speicher2018-08-031-2/+11
|\ \ \ | |_|/ |/| | | | | | | | Make CreateGpgSignatureWorker backwards compatible with original method signature (CE port) See merge request gitlab-org/gitlab-ce!20998
| * | Make CreateGpgSignatureWorker backwards compatible with original method ↵Stan Hu2018-08-021-2/+11
| |/ | | | | | | | | | | | | | | | | | | signature Older versions of GitPushService push a single commit SHA string to the queue, but Gitaly requires that the parameters sent by CreateGpgSignatureWorker are an array. It's possible to have old workers using this original signature or jobs in the retry queue that would fail if CreateGpgSignatureWorker can't handle the string form.
* | Add repository languages for projectsZeger-Jan van de Weg2018-08-011-0/+32
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge branch 'todos-visibility-change' into 'master'Sean McGivern2018-07-314-0/+48
|\ | | | | | | | | Delete todos when users loses target read permissions See merge request gitlab-org/gitlab-ce!20665
| * Remove todos when project feature visibility changesJarka Kadlecová2018-07-311-0/+12
| |
| * Delete todos when users loses target read permissionsJarka Kadlecová2018-07-303-0/+36
| |
* | Fix typos in CreateGpgSignatureWorker specPeter Leitzen2018-07-301-1/+1
| |
* | Create GPG commit signature in bulkFrancisco Javier López2018-07-301-11/+27
|/
* Merge branch 'security-event-counters-private-data' into 'master'Felipe Artur Cardozo2018-07-245-5/+0
|\ | | | | | | | | [master] Don't expose project names in various counters See merge request gitlab/gitlabhq!2418
| * Don't expose project names in various countersYorick Peterse2018-06-215-5/+0
| | | | | | | | | | | | | | Various counters would expose either project names, or full project paths (e.g. "gitlab-org/gitlab-ce"). This commit changes various places where we use "add_event" so we no longer expose (potentially) private information.
* | Replace 'Sidekiq::Testing.inline!' with 'perform_enqueued_jobs'blackst0ne2018-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | `perform_enqueued_jobs` is a Sidekiq method. Using this method violates the Dependency inversion principle[0]. This commit replaces `perform_enqueued_jobs` with ActiveJob's abstract method `perform_enqueued_jobs` in specs. [0]: https://en.wikipedia.org/wiki/Dependency_inversion_principle
* | Merge branch '43312-remove_user_activity_workers' into 'master'Rémy Coutable2018-07-192-60/+0
|\ \ | | | | | | | | | | | | | | | | | | Delete UserActivities and related workers Closes #43312 See merge request gitlab-org/gitlab-ce!20597
| * | Delete UserActivities and related workers43312-remove_user_activity_workersImre Farkas2018-07-182-60/+0
| | |
* | | Improve email address parsingGeorge Thomas2018-07-191-12/+49
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you enter the following RFC 2822 compliant address: `John Doe <john@doe.com>` Gitlab will attempt to send three emails: 1) John 2) Doe 3) john@doe.com With this change given the following: `John Doe <johndoe@example.com>` `Jane Doe <janedoe@example.com>` Gitlab will send emails to `johndoe@example.com` and `janedoe@example.com`
* | Remove Repository#path memoizationJacob Vosmaer (GitLab)2018-07-121-6/+1
| |
* | Resolve "Rename the `Master` role to `Maintainer`" BackendMark Chao2018-07-112-2/+2
| |
* | Merge branch ↵Douwe Maan2018-07-111-6/+34
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | '45592-nomethoderror-undefined-method-commit-for-nil-nilclass-in-sidekiq-caused-by-a-merge-commit-in-a-forked-project-with-upstream-project-deleted' into 'master' Resolve "NoMethodError: undefined method `commit' for nil:NilClass in sidekiq caused by a merge commit in a forked project with upstream project deleted." Closes #45592 See merge request gitlab-org/gitlab-ce!20534
| * | Fix ProcessCommitWorker when upstream project is deletedSean McGivern2018-07-101-6/+34
| | |
* | | Fix ArgumentError in GitGarbageCollectWorker Sidekiq jobStan Hu2018-07-101-0/+6
|/ / | | | | | | | | | | | | When the Gitaly call failed, the exception handling failed because `method` is expected to have a parameter. Closes #49096
* | Resolve Naming/UncommunicativeMethodLin Jen-Shin2018-07-091-2/+2
| |
* | Updates from `rubocop -a`Lin Jen-Shin2018-07-093-9/+9
| |
* | Add ExclusiveLease guards for RepositoryCheck::{DispatchWorker,BatchWorker}Stan Hu2018-07-062-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | We saw in production that DispatchWorker was running about twice an hour, which would schedule twice as many jobs as it should. For some reason, BatchWorker was running 1000 times per hour, possibly due to Sidekiq RSS kills that caused these jobs to restart. Adding an ExclusiveLease prevents these jobs from running more than they should. Relates to https://gitlab.com/gitlab-com/infrastructure/issues/4526