summaryrefslogtreecommitdiff
path: root/spec/services
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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.
* | Merge branch '37288-fix-wrong-header-when-testing-webhook' into 'master'Douwe Maan2017-09-073-13/+25
|\ \ | | | | | | | | | | | | | | | | | | Fix a wrong `X-Gitlab-Event` header when testing webhooks Closes #37288 See merge request !14108
| * | Fix a wrong `X-Gitlab-Event` header when testing webhooks37288-fix-wrong-header-when-testing-webhookRémy Coutable2017-09-073-13/+25
| |/ | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch 'zj-auto-devops-table' into 'master'Kamil Trzciński2017-09-071-1/+1
|\ \ | | | | | | | | | | | | | | | | | | Implement the implied CI/CD config for AutoDevOps Closes #34777 See merge request !13923
| * \ Merge remote-tracking branch 'origin/master' into ↵Kamil Trzcinski2017-09-073-3/+3
| |\ \ | | | | | | | | | | | | zj/gitlab-ce-zj-auto-devops-table
| * \ \ Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵Kamil Trzcinski2017-09-061-0/+11
| |\ \ \ | | | |/ | | |/| | | | | zj/gitlab-ce-zj-auto-devops-table
| * | | Merge branch 'master' into zj-auto-devops-tableZeger-Jan van de Weg2017-09-066-88/+137
| |\ \ \
| * | | | Use hook for setting Pipeline config_sourceZeger-Jan van de Weg2017-09-061-1/+1
| | | | |
* | | | | Merge branch '31362_decrease_cyclomatic_complexity_threshold_step3' into ↵Rémy Coutable2017-09-071-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Decrease Cyclomatic Complexity threshold to 14 See merge request !13972
| * | | | | fix CIMaxim Rydkin2017-09-071-1/+1
| | |_|/ / | |/| | |
* | | | | Merge branch '23079-remove-default-scope-in-sortable' into 'master'Douwe Maan2017-09-071-2/+2
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | Removes default scope from sortable Closes #23079 See merge request !13558
| * | | | Removes default scope from sortable23079-remove-default-scope-in-sortableTiago Botelho2017-09-071-2/+2
| | | | |
* | | | | Merge branch 'ee_issue_928_backport' into 'master'Sean McGivern2017-09-073-3/+3
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | Group boards CE backport See merge request !13883
| * | | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵Simon Knox2017-09-0618-119/+349
| |\ \ \ \ | | |/ / / | | | | | | | | | | ee_issue_928_backport
| * | | | Backport specsFelipe Artur2017-08-311-1/+1
| | | | |
| * | | | Continue BE backportFelipe Artur2017-08-312-2/+2
| | | | |
* | | | | Merge branch ↵Kamil Trzciński2017-09-061-0/+11
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'fix/sm/33281-activerecord-recordinvalid-when-build-has-nil-protected' into 'master' Fix 422 error when retry job Closes #33281 See merge request !14082
| * | | | Fix specShinya Maeda2017-09-071-1/+1
| | | | |
| * | | | Use before_save :set_protectedShinya Maeda2017-09-061-0/+11
| | |/ / | |/| |
* | | | Resolve outdated diff discussions on pushSean McGivern2017-09-061-15/+47
|/ / /
* | | Merge branch ↵Kamil Trzciński2017-09-051-52/+0
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'fix/sm/35650-remove-createtriggerrequestservice-and-forbid-to-persist-variables-on-ci-triggerrequest' into 'master' Removes `CreateTriggerRequestService` and add a blocker to prevent saving variables on `Ci::TriggerRequest` Closes #35650 See merge request !13792
| * | | Remove CreateTriggerRequestService and forbit to save variables on ↵Shinya Maeda2017-09-041-52/+0
| | | | | | | | | | | | | | | | Ci::TriggerRequest
* | | | Use script_failure. Add runner_system_failure. Improve spec.feature/sm/37239-implement-failure_reason-on-ci_buildsShinya Maeda2017-09-051-1/+1
| | | |
* | | | - Allow runner API to pass failure_reasonShinya Maeda2017-09-051-1/+1
| | | | | | | | | | | | | | | | - Fix spec
* | | | Fix enum listsShinya Maeda2017-09-051-1/+1
| | | |
* | | | Implement `failure_reason` on `ci_builds`Shinya Maeda2017-09-051-0/+1
|/ / /
* | | Merge branch ↵Kamil Trzciński2017-09-043-20/+88
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | 'feature/sm/33281-protected-runner-executes-jobs-on-protected-branch' into 'master' Protected runner executes jobs on protected branch [Solution 1] Closes #33281 See merge request !13194
| * | Fix spec on egister_job_service_spec.rbfeature/sm/33281-protected-runner-executes-jobs-on-protected-branchShinya Maeda2017-09-031-32/+32
| | |
| * | Fix specShinya Maeda2017-09-031-1/+1
| | |
| * | Fix specShinya Maeda2017-09-032-14/+40
| | |