summaryrefslogtreecommitdiff
path: root/spec/services
Commit message (Collapse)AuthorAgeFilesLines
* Hide Gollum inside Gitlab::Git::WikiJacob Vosmaer2017-10-031-4/+7
|
* Merge branch '38202-cannot-rename-a-hashed-project' into 'master'Nick Thomas2017-10-032-30/+79
|\ | | | | | | | | | | | | Resolve "Cannot rename a hashed project" Closes #38202 See merge request gitlab-org/gitlab-ce!14428
| * Fix specs for project creation and update services38202-cannot-rename-a-hashed-projectDouglas Barbosa Alexandre2017-10-022-3/+3
| |
| * Doesn't check if path exists on disk when renaming a hashed projectDouglas Barbosa Alexandre2017-10-022-30/+79
| |
* | Merge branch 'ff_port_from_ee' into 'master'Sean McGivern2017-10-031-0/+84
|\ \ | |/ |/| | | | | Move Fast-Forward Merge to CE See merge request gitlab-org/gitlab-ce!14272
| * Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ff_port_from_eeValery Sizov2017-10-025-9/+15
| |\
| * \ Merge branch 'master' into ff_port_from_eeEric Eastwood2017-09-287-109/+131
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: app/models/project.rb db/schema.rb
| * \ \ Merge branch 'master' into ff_port_from_eeEric Eastwood2017-09-268-7/+79
| |\ \ \
| * | | | Add spec for FfMergeServiceValery Sizov2017-09-191-0/+84
| | | | |
* | | | | Fix gitlab-rake gitlab:import:repos taskStan Hu2017-10-021-0/+9
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of a change in GitLab 9.5.4 to prevent users from assuming control of a repository already on disk, the import task broke. Imports would fail with the message, "There is already a repository with that name on disk". This change skips the validation when the import is done from the command-line. Closes #37682
* | | | Create repositories via GitalyJacob Vosmaer2017-09-294-8/+14
| | | |
* | | | Migrate Gitlab::Git::Repository#add_tag to Gitalyfeature/migrate-repository-add-tag-to-gitalyAhmad Sherif2017-09-291-1/+1
| |_|/ |/| | | | | | | | Closes gitaly#601
* | | Merge branch 'fix-mr-sidebar-counter-after-merge' into 'master'Robert Speicher2017-09-281-0/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Clear merge requests counter cache after merge Closes gitlab-ee#3573 and #38344 See merge request gitlab-org/gitlab-ce!14563
| * | | Clear merge requests counter cache after mergeSean McGivern2017-09-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Before this change, the MR counter in the sidebar would be wrong if an MR had been merged since the last update, but not opened or closed, as merging did not trigger a counter cache update.
* | | | Add support to migrate existing projects to Hashed Storage asynchashed-storage-migration-pathGabriel Mazetto2017-09-281-0/+74
|/ / /
* | | Merge branch 'refactor-services' into 'master'Grzegorz Bizon2017-09-283-6/+6
|\ \ \ | | | | | | | | | | | | | | | | Refactor services to match EE signature See merge request gitlab-org/gitlab-ce!14385
| * | | refactor emails servicerefactor-servicesJames Lopez2017-09-282-3/+3
| | | |
| * | | refactor users update serviceJames Lopez2017-09-281-4/+4
| | | |
| * | | fix specsJames Lopez2017-09-283-6/+6
| | | |
* | | | Merge branch '38476-improve-merge-jid-cleanup-on-merge-process' into 'master'Sean McGivern2017-09-281-3/+20
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Clean merge_jid whenever necessary on the merge process Closes #38476 See merge request gitlab-org/gitlab-ce!14540
| * | | Clean merge_jid whenever necessary on the merge process38476-improve-merge-jid-cleanup-on-merge-processOswaldo Ferreira2017-09-271-3/+20
| | |/ | |/| | | | | | | MergeRequest#merge_jid should be cleaned up whenever we hit a known error on MergeService#execute. This way we can keep track if the MR is really "ongoing" or "stuck"
* | | Add test for head pipeline assignment when skippedGrzegorz Bizon2017-09-261-0/+20
| | | | | | | | | | | | Closes gitlab-org/gitlab-ce#34415
* | | Fix code style offenses in pipeline create servicesGrzegorz Bizon2017-09-261-1/+0
| | |
* | | Extract pipeline chain builder classes from serviceGrzegorz Bizon2017-09-251-99/+0
|/ /
* | Simplify a testNick Thomas2017-09-211-6/+1
| |
* | Merge branch 'remove-use-key-worker' into 'master'Rémy Coutable2017-09-211-0/+68
|\ \ | | | | | | | | | | | | | | | | | | Stop using Sidekiq for updating Key#last_used_at Closes #36663 See merge request gitlab-org/gitlab-ce!14391
| * | Stop using Sidekiq for updating Key#last_used_atremove-use-key-workerYorick Peterse2017-09-201-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge branch 'fix-counts-caching' into 'master'Douwe Maan2017-09-206-6/+13
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Fix refreshing of issues/MR count caches Closes #38061 See merge request gitlab-org/gitlab-ce!14363
| * | Fix refreshing of issues/MR count cachesfix-counts-cachingYorick Peterse2017-09-196-6/+13
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures the open issues/MR count caches are refreshed properly when creating new issues or MRs. This MR also includes a change to the cache keys to ensure all caches are rebuilt on the fly. This particular problem was not caught in the test suite due to a null cache being used, resulting in all calls that would use a cache using the underlying data directly. In production the code would fail because a newly saved record returns an empty hash in #changes meaning checks such as `state_changed? || confidential_changed?` would return false for new rows, thus never updating the counters. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/38061
* | Fix rewriting issue references with group milestonesGrzegorz Bizon2017-09-201-1/+3
|/
* Merge branch 'operation-service-merge' into 'master'Rémy Coutable2017-09-181-3/+1
|\ | | | | | | | | | | | | Prepare Repository#merge for migration to Gitaly Closes gitaly#559 See merge request gitlab-org/gitlab-ce!14154
| * Prepare Repository#merge for migration to Gitalyoperation-service-mergeJacob Vosmaer2017-09-151-3/+1
| |
* | Merge branch 'master' into 'issue_37640'issue_37640Felipe Artur2017-09-157-6/+62
|\ \ | | | | | | | | | # Conflicts: # db/schema.rb
| * | created services for keyshaseeb2017-09-154-1/+54
| |/
| * Merge branch 'backstage/gb/optimize-some-specs-with-rspec-set' into 'master'Rémy Coutable2017-09-131-4/+5
| |\ | | | | | | | | | | | | Optimize some tests with RSpec Set See merge request !14047
| | * Optimize CI/CD build retry service specsGrzegorz Bizon2017-09-131-4/+5
| | |
| * | Add change log. Fix spec.fix/sm/37559-pipeline-triggered-through-api-not-showing-trigger-variablesShinya Maeda2017-09-131-1/+1
| | |
| * | Fix PipelineTriggerService to associate trigger_request with buildsShinya Maeda2017-09-131-0/+2
| |/
| * Allow to use same periods for housekeeping tasksAlex Lossent2017-09-111-1/+1
| | | | | | | | | | | | | | | | This enables skipping a lesser housekeeping task (incremental or full repack) by consistently scheduling a higher task (respectively full repack or gc) with the same period. Cf. #34981
* | Add data migrationFelipe Artur2017-09-151-1/+1
| |
* | Fix project feature being deleted when updating project with invalid ↵Felipe Artur2017-09-121-2/+19
|/ | | | visibility level
* Rework how recent push events are retrieveduser-recent-pushYorick Peterse2017-09-082-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever you push to a branch GitLab will show a button to create a merge request (should one not exist already). The underlying code to display this data was quite inefficient. For example, it involved multiple slow queries just to figure out what the most recent push event was. This commit changes the way this data is retrieved so it's much faster. This is achieved by caching the ID of the last push event on every push, which is then retrieved when loading certain pages. Database queries are only executed if necessary and the cached data is removed automatically once a merge request has been created, or 2 hours after being stored. A trade-off of this approach is that we _only_ track the last event. Previously if you were to push to branch A and B then create a merge request for branch B we'd still show the widget for branch A. As of this commit this is no longer the case, instead we will only show the widget for the branch you pushed to most recently. Once a merge request exists the widget is no longer displayed. Alternative solutions are either too complex and/or too slow, hence the decision was made to settle for this trade-off. Performance Impact ------------------ In the best case scenario (= a user didn't push anything for more than 2 hours) we perform a single Redis GET per page. Should there be cached data we will run a single (and lightweight) SQL query to get the event data from the database. If a merge request already exists we will run an additional DEL to remove the cache key. The difference in response timings can vary a bit per project. On GitLab.com the 99th percentile of time spent in User#recent_push hovers between 100 milliseconds and 1 second, while the mean hovers around 50 milliseconds. With the changes in this MR the expected time spent in User#recent_push is expected to be reduced down to just a few milliseconds. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/35990
* Merge branch ↵Douwe Maan2017-09-071-5/+38
|\ | | | | | | | | | | | | | | | | '30473-allow-creation-of-subgroups-with-gitlab_default_can_create_group-set-to-false' into 'master' Make Members with Owner and Master roles always able to create subgroups Closes #30473 See merge request !14046
| * Make Members with Owner and Master roles always able to create subgroups30473-allow-creation-of-subgroups-with-gitlab_default_can_create_group-set-to-falseRuben Davila2017-09-071-5/+38
| |
* | Merge branch ↵Douwe Maan2017-09-071-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | '35558-only-one-garbage-collection-should-be-running-per-project-at-once' into 'master' Adds exclusive lease to Git garbage collect worker. Closes #35558 See merge request !14036
| * Adds exclusive lease to Git garbage collect worker.35558-only-one-garbage-collection-should-be-running-per-project-at-onceTiago Botelho2017-09-071-0/+1
| |
* | Merge branch 'improve-share-locking-feature-for-subgroups' into 'master'Douwe Maan2017-09-071-0/+34
|\ \ | | | | | | | | | | | | | | | | | | Improve "Share with group lock" feature for subgroups Closes #30550 See merge request !13944
| * | Refer to “Share with group lock” consistentlyimprove-share-locking-feature-for-subgroupsMichael Kozono2017-09-061-1/+1
| | |
| * | Specify nested_groups specsMichael Kozono2017-09-061-1/+1
| | |
| * | Enforce share_with_group_lock rulesMichael Kozono2017-09-061-0/+34
| |/ | | | | | | …in Groups::UpdateService instead of only in the browser.