summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Rework how recent push events are retrieveduser-recent-pushYorick Peterse2017-09-0813-86/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-079-31/+235
|\ | | | | | | | | | | | | | | | | '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-079-31/+235
| |
* | Merge branch 'docs/autodevops' into 'master'Kamil Trzciński2017-09-0711-10/+455
|\ \ | | | | | | | | | | | | | | | | | | Add Auto DevOps docs Closes #37051 See merge request !14031
| * | Add Auto DevOps docsAchilleas Pipinellis2017-09-0711-10/+455
|/ /
* | Merge branch 'zj-update-rails-template' into 'master'Kamil Trzciński2017-09-072-0/+5
|\ \ | | | | | | | | | | | | | | | | | | Update rails template to include postgres Closes #37156 See merge request !14120
| * | Update rails template to include postgreszj-update-rails-templateZeger-Jan van de Weg2017-09-072-0/+5
| | |
* | | Merge branch ↵Douwe Maan2017-09-075-24/+154
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | '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-075-24/+154
| | |
* | | Merge branch 'rs-trigger-build-docs-offenses' into 'master'Rémy Coutable2017-09-071-6/+6
|\ \ \ | | | | | | | | | | | | | | | | Resolve RuboCop violations in scripts/trigger-build-docs See merge request !14118
| * | | Resolve RuboCop violations in scripts/trigger-build-docsRobert Speicher2017-09-071-6/+6
| | | |
* | | | Merge branch 'winh-filter-dropdowns-keyboard-selection' into 'master'Clement Ho2017-09-071-0/+11
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore droplab item style for keyboard navigation Closes #37218 See merge request !13921
| * | | | Restore droplab item style for keyboard navigationwinh-filter-dropdowns-keyboard-selectionwinh2017-09-061-0/+11
| | | | |
* | | | | Merge branch 'improve-share-locking-feature-for-subgroups' into 'master'Douwe Maan2017-09-0720-134/+861
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve "Share with group lock" feature for subgroups Closes #30550 See merge request !13944
| * | | | | Optimize policy ruleMichael Kozono2017-09-071-2/+3
| | | | | |
| * | | | | Refer to “Share with group lock” consistentlyimprove-share-locking-feature-for-subgroupsMichael Kozono2017-09-0610-70/+70
| | | | | |
| * | | | | Update “Share with group lock” docsMichael Kozono2017-09-063-17/+24
| | | | | |
| * | | | | Make UpdateService error message translatableWinnie Hellmann2017-09-061-1/+1
| | | | | |
| * | | | | Replace <h5> with <label>Winnie Hellmann2017-09-062-3/+1
| | | | | |
| * | | | | Add missing .html_safesWinnie Hellmann2017-09-061-3/+3
| | | | | |
| * | | | | Remove top margin from .control-labelWinnie Hellmann2017-09-061-0/+2
| | | | | |
| * | | | | Link or not link depending on permissionsMichael Kozono2017-09-062-11/+29
| | | | | |
| * | | | | Fix ability when Share lock is offMichael Kozono2017-09-062-45/+62
| | | | | |
| * | | | | Link to ancestor settings pageMichael Kozono2017-09-062-4/+10
| | | | | |
| * | | | | Refactor based on code reviewMichael Kozono2017-09-066-9/+9
| | | | | |
| * | | | | Fix “Share lock” help textMichael Kozono2017-09-064-44/+116
| | | | | |
| * | | | | Simplify disabling checkboxMichael Kozono2017-09-062-9/+5
| | | | | |
| * | | | | Fix “Share lock” policy for deeply nested groupsMichael Kozono2017-09-062-10/+36
| | | | | |
| * | | | | Make texts translatableWinnie Hellmann2017-09-062-8/+11
| | | | | |
| * | | | | Use <h5> for .control-labelWinnie Hellmann2017-09-061-1/+1
| | | | | |
| * | | | | Replace duplicate <label> by <div>winh2017-09-061-1/+2
| | | | | |
| * | | | | Remove unnessesary slash from HAMLwinh2017-09-061-1/+1
| | | | | |
| * | | | | Add changelog entry for "Share with group lock"Michael Kozono2017-09-061-0/+6
| | | | | |
| * | | | | Dry up method for code climateMichael Kozono2017-09-063-27/+21
| | | | | |
| * | | | | Specify nested_groups specsMichael Kozono2017-09-065-5/+5
| | | | | |
| * | | | | Enforce share_with_group_lock rulesMichael Kozono2017-09-064-1/+104
| | | | | | | | | | | | | | | | | | | | | | | | …in Groups::UpdateService instead of only in the browser.
| * | | | | Enable share_with_group_lock on subgroupMichael Kozono2017-09-063-0/+188
| | | | | | | | | | | | | | | | | | | | | | | | …when needed
| * | | | | Vary share lock setting UIMichael Kozono2017-09-063-2/+174
| | | | | | | | | | | | | | | | | | | | | | | | …based on whether the current user owns the parent group and whether the parent group or current group is share locked.
| * | | | | Add post-nested group Share lock integration testsMichael Kozono2017-09-061-34/+86
| | | | | |
| * | | | | Add pre-nested group share lock testsMichael Kozono2017-09-061-40/+102
| | | | | |
| * | | | | Refactor and rename specsMichael Kozono2017-09-062-12/+12
| | | | | |
| * | | | | Move share lock setting and tweak UIMichael Kozono2017-09-061-7/+10
| | | | | |
* | | | | | Merge branch '32665-refactor-project-visibility-settings' into 'master'Phil Hughes2017-09-0721-166/+815
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Make project and features visibility settings less confusing" Closes #32665 See merge request !14062
| * | | | | | Resolve "Make project and features visibility settings less confusing"Mike Greiling2017-09-0721-166/+815
|/ / / / / /
* | | | | | Merge branch '37158-autodevops-banner' into 'master'Kamil Trzciński2017-09-0717-23/+251
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Banner to enable Auto DevOps at project level" Closes #37158 See merge request !13991
| * | | | | | Fix broken case for projects:merge_requests:indexKamil Trzcinski2017-09-071-3/+3
| | | | | | |
| * | | | | | Merge branch 'zj/gitlab-ce-zj-auto-devops-table' into 37158-autodevops-bannerKamil Trzcinski2017-09-07169-1041/+2088
| |\ \ \ \ \ \
| * | | | | | | Updates tests and i18n37158-autodevops-bannerFilipa Lacerda2017-09-072-13/+4
| | | | | | | |
| * | | | | | | Merge branch 'zj-auto-devops-table' of gitlab.com:zj/gitlab-ce into ↵Kamil Trzcinski2017-09-0791-262/+1915
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 37158-autodevops-banner
| * | | | | | | | Add has_auto_devops_implicitly_disabledKamil Trzcinski2017-09-073-2/+49
| | | | | | | | |