summaryrefslogtreecommitdiff
path: root/app/services
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | Remove event caching codeYorick Peterse2016-11-234-7/+0
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flushing the events cache worked by updating a recent number of rows in the "events" table. This has the result that on PostgreSQL a lot of dead tuples are produced on a regular basis. This in turn means that PostgreSQL will spend considerable amounts of time vacuuming this table. This in turn can lead to an increase of database load. For GitLab.com we measured the impact of not using events caching and found no measurable increase in response timings. Meanwhile not flushing the events cache lead to the "events" table having no more dead tuples as now rows are only inserted into this table. As a result of this we are hereby removing events caching as it does not appear to help and only increases database load. For more information see the following comment: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6578#note_18864037
* | | | | | Merge branch 'rephrase-system-notes' into 'master' Robert Speicher2016-11-252-44/+43
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | Rephrase some system notes to be compatible with new system note style See merge request !7692
| * | | | | Rephrase some system notes to be compatible with new system note stylerephrase-system-notesDouwe Maan2016-11-242-44/+43
| |/ / / /
* | | | | Backport Note#commands_changes from EEbackport-commands-paramsDouwe Maan2016-11-241-0/+2
|/ / / /
* | | | Merge branch 'remove-require-from-services' into 'master' Robert Speicher2016-11-2215-32/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Remove unnecessary require_relative calls from service classes. See merge request !7601
| * | | | Remove unnecessary require_relative calls from service classesSemyon Pupkov2016-11-2215-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Rails by default use autoload for all dirs from app folder. require_relative not needed. See ActiveSupport::Dependencies.autoload_paths
* | | | | Merge branch 'hide-empty-merge-request-diffs' into 'master' Sean McGivern2016-11-211-12/+9
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix errors happening when source branch of merge request is removed and then restored See merge request !7568
| * | | | | Revert "Do not create a MergeRequestDiff record when source branch is deleted"Adam Niedzielski2016-11-211-12/+9
| | |/ / / | |/| | | | | | | | | | | | | This reverts commit f913170e2f76ef44800f0272cb7fb40b9d6709ee.
* | | | | Merge branch 'smarter-cache-invalidation' into 'master' Sean McGivern2016-11-211-2/+21
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | Smarter cache invalidation Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23550 See merge request !7360
| * | | | Refactor cache refreshing/expiringYorick Peterse2016-11-211-2/+21
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This refactors repository caching so it's possible to selectively refresh certain caches, instead of just expiring and refreshing everything. To allow this the various methods that were cached (e.g. "tag_count" and "readme") use a similar pattern that makes expiring and refreshing their data much easier. In this new setup caches are refreshed as follows: 1. After a commit (but before running ProjectCacheWorker) we expire some basic caches such as the commit count and repository size. 2. ProjectCacheWorker will recalculate the commit count, repository size, then refresh a specific set of caches based on the list of files changed in a push payload. This requires a bunch of changes to the various methods that may be cached. For one, data should not be cached if a branch used or the entire repository does not exist. To prevent all these methods from handling this manually this is taken care of in Repository#cache_method_output. Some methods still manually check for the existence of a repository but this result is also cached. With selective flushing implemented ProjectCacheWorker no longer uses an exclusive lease for all of its work. Instead this worker only uses a lease to limit the number of times the repository size is updated as this is a fairly expensive operation.
* | | | Merge branch 'fix/do-not-add-todo-when-build-allowed-to-fail' into 'master' 24710-external-statuses-pipelineKamil Trzciński2016-11-211-1/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not create TODO when build is allowed to fail ## What does this MR do? Do not create a TODO when build that failed is allowed to fail. ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - Tests - [x] Added for this feature/bug - [ ] All builds are passing ## What are the relevant issue numbers? Closes #22280 See merge request !7618
| * | | | Do not create TODO when build is allowed to failGrzegorz Bizon2016-11-211-1/+6
| |/ / /
* | | | Merge branch 'ee-870-backport' into 'master' Sean McGivern2016-11-211-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Backport some changes done from Time Tracking feature in EE. See merge request !7604
| * | | Backport some changes done from Time Tracking feature in EE.ee-870-backportRuben Davila2016-11-181-1/+1
| | | |
* | | | Fix regression in Merge request formAlex Sanford2016-11-191-2/+2
| |/ / |/| | | | | | | | | | | | | | Merge request !7163 caused an error message to appear on the Merge Request form when it was first loaded by the user. This commit fixes that regression bug.
* | | Merge branch 'feature/precalculate-authorized-projects' into 'master' Douwe Maan2016-11-182-0/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Precalculate authorized projects in database ## What does this MR do? It caches user's authorized projects in database instead of using multiple unions, which should simplify and speed-up things since this operation (getting authorized projects) is used a lot. ## Are there points in the code the reviewer needs to double check? Did we miss a scenario where we need to refresh the list of projects? ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [ ] ~~API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? #23150 See merge request !6839
| * | | Precalculate user's authorized projects in databaseAhmad Sherif2016-11-182-0/+11
| |/ / | | | | | | | | | Closes #23150
* | | Fix a race condition that allowed soft-deleted groups to remain in the database.Timothy Andrew2016-11-181-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intended flow is: Soft-delete group (sync) -> Delete group projects (async) -> Hard-delete group (async) The soft-delete was run in a transaction, which was committed only after the async job (for hard-deletion) was kicked off. There was a race condition here - the soft-delete transaction could complete _after_ the hard delete completed, leaving a soft-deleted record in the database. This commit removes this race condition. There is no need to run the soft-delete in a transaction. The soft-delete completes before the async job is kicked off.
* | | Merge branch 'feature/subscribe-to-group-level-labels' into 'master' Sean McGivern2016-11-173-18/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Support subscribing to group labels https://gitlab.com/gitlab-org/gitlab-ce/issues/23586 See merge request !7215
| * | | Remove default value for `project` argument on subscribable concernDouglas Barbosa Alexandre2016-11-172-4/+4
| | | |
| * | | Refactoring notification service to find subscriptions per projectDouglas Barbosa Alexandre2016-11-171-13/+13
| | | |
| * | | Fix small typo on NotificationServiceDouglas Barbosa Alexandre2016-11-171-1/+1
| |/ /
* | | Merge branch 'chat-name-authorize' into 'master' Rémy Coutable2016-11-172-0/+64
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Allows to authorize chat user against GitLab. This is needed for: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7438 See merge request !7450
| * | Change last_used_at to use touchchat-name-authorizeKamil Trzcinski2016-11-171-1/+1
| | |
| * | Improve code design after code reviewKamil Trzcinski2016-11-161-1/+1
| | |
| * | Merge remote-tracking branch 'origin/master' into chat-name-authorizeKamil Trzcinski2016-11-164-7/+36
| |\ \
| * | | Add most of specs for chat namesKamil Trzcinski2016-11-162-5/+22
| | | |
| * | | Create relation between chat user and GitLab user and allow to authorize ↵Kamil Trzcinski2016-11-162-0/+47
| | | | | | | | | | | | | | | | them [ci skip]
* | | | Merge branch 'feature/environment-teardown-when-branch-deleted' into 'master' Kamil Trzciński2016-11-173-6/+65
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop environment when branch is deleted ## What does this MR do? This MR adds a environment teardown service, that is called when user deletes a branch. This most often happens when merge requests is merged. ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing ## What are the relevant issue numbers? Closes #23218 See merge request !7355
| * | | | Remove unnecessary check from environments servicefeature/environment-teardown-when-branch-deletedGrzegorz Bizon2016-11-161-5/+0
| | | | |
| * | | | Remove redundant call to after branch delete serviceGrzegorz Bizon2016-11-161-9/+0
| | | | |
| * | | | Refactor methods for environments in project modelGrzegorz Bizon2016-11-161-1/+2
| | | | |
| * | | | Improve name of service that stops CI environmentsGrzegorz Bizon2016-11-142-2/+2
| | | | |
| * | | | Check permissions before stopping CI environmentsGrzegorz Bizon2016-11-141-0/+1
| | | | |
| * | | | Add service that runs after branch removed hooksGrzegorz Bizon2016-11-113-6/+45
| | | | |
| * | | | Do not call environments service in repository modelGrzegorz Bizon2016-11-111-1/+1
| | | | |
| * | | | Stop environments for branch after branch removalGrzegorz Bizon2016-11-092-3/+1
| | | | |
| * | | | Make commit an optional arg for environments searchGrzegorz Bizon2016-11-091-8/+4
| | | | |
| * | | | Add environment factory review app traitGrzegorz Bizon2016-11-091-7/+12
| | | | |
| * | | | Add environment teardown serviceGrzegorz Bizon2016-11-082-0/+33
| | | | |
* | | | | Revert "Merge branch '22680-unlabel-limit-autocomplete-to-selected-items' ↵revert-0a3cafb2Douwe Maan2016-11-171-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | into 'master'" This reverts merge request !6796
* | | | | Merge branch 'adam-build-missing-services-when-necessary' into 'master' Douwe Maan2016-11-161-1/+8
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defer saving project services to the database if there are no user changes ## What does this MR do? It defers saving project services to the database as long as it is possible. It creates a project service when creating a project only if this project service has an active template. After that project services are saved on the first edit. ## Are there points in the code the reviewer needs to double check? - tests that used `build_missing_services` before the change - number of queries executed ## Why was this MR needed? Motivation in #22281 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Fixes #22281 See merge request !6958
| * | | | | Defer saving project services to the database if there are no user changesadam-build-missing-services-when-necessaryAdam Niedzielski2016-11-161-1/+8
| | | | | |
* | | | | | Merge branch 'fix-merge-request-screen-deleted-source-branch' into 'master' Sean McGivern2016-11-161-9/+12
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not create a MergeRequestDiff record when source branch is deleted Fixes #23413 Fixes #23897 See merge request !7481
| * | | | | Do not create a MergeRequestDiff record when source branch is deletedfix-merge-request-screen-deleted-source-branchAdam Niedzielski2016-11-161-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to have a valid MergeRequestDiff record when need head_commit_sha. When a source branch is deleted head_commit_sha is nil. This causes an exception in merge request "Changes" tab.
* | | | | | Merge branch '22680-unlabel-limit-autocomplete-to-selected-items' into 'master' Rémy Coutable2016-11-161-1/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limit autocomplete to currently selected items When using the /unlabel command the autocomplete list of labels is now limited to the list of labels currently assigned to the issue. Closes #22680 See merge request !6796
| * | | | | | Limit autocomplete to currently selected itemsAkram FARES2016-11-151-1/+8
| |/ / / / /
* | | | | | shows user avatar in mention autocomplete in editor22790-mention-autocomplete-avatarNur Rony2016-11-161-4/+5
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adds entry in CHANGELOG no uninitialized variable and unnecessary if statement formatting issue in CHANGELOG resolves scss lint warings cleanup: unnecessary css classes adds css class that cleaned up by mistake replaces snake_case variables name with camelCase removes unnecessary css class and adds white color border for avatar moves changelog entry from 8.13 to 8.14 remove bottom margin from avatar-inline resolves lint warnings rebased and moves changelog entry to 8.14 fixes avatar shifting on hover adds entry at top of 8.14 section in CHANGELOG.md calls sanitization for gl.utils syncing changelog with master and created changelog files using cli changes changelog title
* | | | | Merge branch '21076-deleted-merged-branches' into 'master' Douwe Maan2016-11-151-0/+18
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add button to delete all merged branches ## What does this MR do? It adds a button to the branches page that the user can use to delete all the branches that are already merged. This can be used to clean up all the branches that were forgotten to delete while merging MRs. **Note** ~~This MR is WIP until MR !6408 is merged.~~ ## Are there points in the code the reviewer needs to double check? The UX of the actual "Delete merged branches" button. ## Why was this MR needed? Fixes #21076 ## Screenshots ![Branches page without "Delete all merged" button](/uploads/3a2936a83c3547a0fce92a74af880a2d/Screen_Shot_2016-10-17_at_20.06.30.png) Before: ![Screen_Shot_2016-10-17_at_20.07.11](/uploads/55efcebf4e0a45dbfc70ba4a11ca152c/Screen_Shot_2016-10-17_at_20.07.11.png) After: ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #21076 See merge request !6449
| * | | | Add button to delete all merged branchesToon Claes2016-11-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It adds a button to the branches page that the user can use to delete all the branches that are already merged. This can be used to clean up all the branches that were forgotten to delete while merging MRs. Fixes #21076.