summaryrefslogtreecommitdiff
path: root/spec/models
Commit message (Collapse)AuthorAgeFilesLines
* Stop using Sidekiq for updating Key#last_used_atremove-use-key-workerYorick Peterse2017-09-201-22/+9
| | | | | | | | | | | | | | | 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
* Fix rewriting issue references with group milestonesGrzegorz Bizon2017-09-201-5/+10
|
* Merge branch '37894-handle-if-auto-devops-domain-is-not-set' into 'master'Stan Hu2017-09-191-1/+15
|\ | | | | | | | | | | | | Resolve "Handle if Auto DevOps domain is not set" Closes #37894 See merge request gitlab-org/gitlab-ce!14319
| * Add specs for warning message shown in Auto DevOps settings37894-handle-if-auto-devops-domain-is-not-setKamil Trzcinski2017-09-191-2/+10
| |
| * Add warning message if domain or cluster are not configuredbokebilly2017-09-191-1/+7
| |
* | Prepare cherry-pick and revert for migration to GitalyJacob Vosmaer (GitLab)2017-09-191-11/+13
| |
* | Do not pass project path from YAML processorGrzegorz Bizon2017-09-181-0/+1
|/ | | | Use project full path that can be received from a pipeline object
* Merge branch 'operation-service-merge' into 'master'Rémy Coutable2017-09-182-20/+9
|\ | | | | | | | | | | | | 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-152-20/+9
| |
* | created services for keyshaseeb2017-09-152-24/+0
| |
* | Merge branch 'projects-controller-show' into 'master'Rémy Coutable2017-09-152-0/+76
|\ \ | |/ |/| | | | | SQL performance improvements for ProjectsController#show See merge request gitlab-org/gitlab-ce!14226
| * Memoize the latest builds of a pipelineprojects-controller-showYorick Peterse2017-09-141-0/+20
| | | | | | | | | | | | | | | | | | This ensures that if a pipeline is present for the last commit on a project's homepage we only run 1 query to get the builds, instead of running 2 queries. See https://gitlab.com/gitlab-org/gitlab-ce/issues/36878#note_40073339 for more information.
| * Memoize pipelines for project download buttonsYorick Peterse2017-09-141-0/+56
| | | | | | | | | | | | | | | | | | | | | | This adds Project#latest_successful_pipeline_for and Project#latest_successful_pipeline_for_default_branch. The 2nd method memoizes the result (taking nil values into account) to ensure the underlying query isn't executed multiple times when viewing a project's homepage. See https://gitlab.com/gitlab-org/gitlab-ce/issues/36878#note_40073607 for more information.
* | Merge branch 'gitlab-git-user' into 'master'Rémy Coutable2017-09-141-12/+12
|\ \ | | | | | | | | | | | | Rename Gitlab::Git::Committer to User See merge request gitlab-org/gitlab-ce!14254
| * | Rename Gitlab::Git::Committer to UserJacob Vosmaer2017-09-141-12/+12
| | |
* | | Merge branch '37759-also-treat-newlines-as-separator' into 'master'Kamil Trzciński2017-09-141-13/+24
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Treat newlines as separators for pipeline emails service Closes #37759 See merge request gitlab-org/gitlab-ce!14250
| * | Also treat newlines as separator, as people would do thatLin Jen-Shin2017-09-131-13/+24
| |/ | | | | | | | | Before this fix, I don't know if those emails would work having newlines in them.
* | Fix job coverage specsbackstage/gb/optimize-some-specs-with-rspec-setGrzegorz Bizon2017-09-131-1/+1
| |
* | Fix build specs after using `set` instead of `let`Grzegorz Bizon2017-09-131-13/+22
| |
* | Fix syntax error in LFS objects specsGrzegorz Bizon2017-09-131-1/+1
| |
* | Optimize CI/CD build model specsGrzegorz Bizon2017-09-131-8/+5
| |
* | Optimize a few simple spec files by using `set`Grzegorz Bizon2017-09-134-6/+9
| |
* | Optimize LFS objects specsGrzegorz Bizon2017-09-131-4/+11
|/
* Merge branch 'revert-2f46c3a8' into 'master'Robert Speicher2017-09-121-0/+2
|\ | | | | | | | | Revert "Merge branch 'revert-f2421b2b' into 'master'" See merge request !14190
| * Revert "Merge branch 'revert-f2421b2b' into 'master'"revert-2f46c3a8Annabel Dunstone Gray2017-09-111-0/+2
| | | | | | This reverts merge request !14148
* | Merge branch 'housekeeping_settings' into 'master'Douwe Maan2017-09-121-4/+18
|\ \ | | | | | | | | | | | | | | | | | | Allow to use same periods for housekeeping tasks Closes #34981 See merge request !13711
| * | Allow to use same periods for housekeeping tasksAlex Lossent2017-09-111-4/+18
| |/ | | | | | | | | | | | | | | 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
* | Merge branch 'hide-read-registry-scope-when-registry-disabled' into 'master'Kamil Trzciński2017-09-121-4/+31
|\ \ | |/ |/| | | | | Hide read_registry scope when registry is disabled on instance See merge request !13314
| * Hide read_registry scope when registry is disabled on instanceRobin Bobbitt2017-08-211-4/+31
| |
* | Merge branch 'user-recent-push' into 'master'Douwe Maan2017-09-112-45/+101
|\ \ | | | | | | | | | | | | | | | | | | Rework how recent push events are retrieved Closes #35990 See merge request !13995
| * | Rework how recent push events are retrieveduser-recent-pushYorick Peterse2017-09-082-45/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Revert "Merge branch ↵revert-f2421b2bRubén Dávila2017-09-081-2/+0
| | | | | | | | | | | | | | | '35012-navigation-add-option-to-change-navigation-color-palette' into 'master'" This reverts merge request !13619
* | | Merge branch '29943-environment-folder' into 'security-9-5'Kamil Trzciński2017-09-071-0/+22
|/ / | | | | | | | | Do not use `location.pathname` when accessing environments folders See merge request !2147
* | Merge branch 'improve-share-locking-feature-for-subgroups' into 'master'Douwe Maan2017-09-071-0/+112
|\ \ | | | | | | | | | | | | | | | | | | 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-21/+21
| | |
| * | Refactor based on code reviewMichael Kozono2017-09-061-3/+3
| | |
| * | Specify nested_groups specsMichael Kozono2017-09-061-1/+1
| | |
| * | Enable share_with_group_lock on subgroupMichael Kozono2017-09-061-0/+112
| | | | | | | | | | | | …when needed
* | | Merge branch '37158-autodevops-banner' into 'master'Kamil Trzciński2017-09-071-0/+44
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Banner to enable Auto DevOps at project level" Closes #37158 See merge request !13991
| * \ \ Merge branch 'zj/gitlab-ce-zj-auto-devops-table' into 37158-autodevops-bannerKamil Trzcinski2017-09-072-1/+2
| |\ \ \
| * | | | Add has_auto_devops_implicitly_disabledKamil Trzcinski2017-09-071-0/+44
| | | | |
* | | | | Merge branch 'zj-auto-devops-table' into 'master'Kamil Trzciński2017-09-075-5/+287
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | Implement the implied CI/CD config for AutoDevOps Closes #34777 See merge request !13923
| * | | | Merge remote-tracking branch 'origin/master' into ↵Kamil Trzcinski2017-09-072-1/+2
| |\ \ \ \ | | |/ / / | |/| | | | | | | | zj/gitlab-ce-zj-auto-devops-table
| * | | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵Kamil Trzcinski2017-09-062-0/+133
| |\ \ \ \ | | | |/ / | | |/| | | | | | | zj/gitlab-ce-zj-auto-devops-table
| * | | | Add tests to cover all introduced changesKamil Trzcinski2017-09-064-25/+218
| | | | |
| * | | | Improve config source handling codeKamil Trzcinski2017-09-061-5/+9
| | | | |
| * | | | Merge branch 'master' into zj-auto-devops-tableZeger-Jan van de Weg2017-09-0615-102/+345
| |\ \ \ \
| * | | | | Incorporate another round of feedbackZeger-Jan van de Weg2017-09-061-32/+54
| | | | | |
| * | | | | Incorporate reviewZeger-Jan van de Weg2017-09-042-1/+4
| | | | | |
| * | | | | Merge branch 'master' into zj-auto-devops-tableZeger-Jan van de Weg2017-09-049-5/+223
| |\ \ \ \ \