gitlab-org--gitlab-foss/app/controllers/projects
Douwe Maan 4e63411daa Merge branch 'adam-build-missing-services-when-necessary' into 'master'
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
2016-11-16 16:27:54 +00:00
..
boards Merge branch 'master' into issue-board-sidebar 2016-10-19 22:33:34 +01:00
application_controller.rb Remove project_labels from Projects::ApplicationController 2016-10-19 14:58:24 -02:00
artifacts_controller.rb Extract ref_name and path in before_action, feedback: 2016-08-26 13:10:03 +08:00
avatars_controller.rb Display project icon from default branch 2016-08-25 14:52:14 +02:00
badges_controller.rb Add method for coverage badge in badges controller 2016-08-15 14:39:46 +02:00
blame_controller.rb
blob_controller.rb fixes distinction between renaming a file and updating its content and 2016-09-09 23:05:30 -04:00
boards_controller.rb Fix board relates specs 2016-10-11 11:47:56 -03:00
branches_controller.rb Add button to delete all merged branches 2016-11-09 21:04:03 +01:00
builds_controller.rb Merge remote-tracking branch 'upstream/master' into pipeline-emails 2016-09-21 16:19:07 +08:00
commit_controller.rb Add Pipelines for Commit 2016-09-27 22:11:13 +01:00
commits_controller.rb Pass `@ref` along so we know which pipeline to show 2016-10-24 22:26:06 +08:00
compare_controller.rb Make Compare#diffs diff_options a regular argument 2016-08-03 09:32:01 -07:00
container_registry_controller.rb
cycle_analytics_controller.rb Implement fourth round of comments from @DouweM. 2016-09-21 09:57:14 +05:30
deploy_keys_controller.rb Namespace EnableDeployKeyService under Projects 2016-08-08 20:59:51 +02:00
discussions_controller.rb Project tools visibility level 2016-09-01 11:47:59 -03:00
environments_controller.rb Add logical validation to gitlab-ci.yml 2016-10-18 12:22:51 +02:00
find_file_controller.rb
forks_controller.rb
git_http_client_controller.rb Merge branch 'fix-unathorized-cloning' into 'security' 2016-11-09 12:27:17 +01:00
git_http_controller.rb Merge branch 'fix-unathorized-cloning' into 'security' 2016-11-09 12:27:17 +01:00
graphs_controller.rb Use Linguist::Language[] instead of creating a hash 2016-10-10 16:18:26 +02:00
group_links_controller.rb Only skip group when it's actually a group in the "Share with group" select 2016-11-04 12:42:19 +01:00
hooks_controller.rb Add option to confidential issues events to trigger Webhooks 2016-08-31 18:34:23 -03:00
imports_controller.rb
issues_controller.rb add "x of y tasks completed" on issuable 2016-10-28 14:01:36 -02:00
labels_controller.rb Remove unnecessary includes(:priorities) on Projects::LabelsController 2016-10-31 23:27:49 -02:00
lfs_api_controller.rb Move the `objects` method to `LfsHelper` so that it is also available to `LfsStorageController` 2016-11-10 20:04:00 -06:00
lfs_storage_controller.rb Verify JWT messages from gitlab-workhorse 2016-09-05 15:05:31 +02:00
merge_requests_controller.rb Ensure labels are loaded on "show" methods of MR 2016-11-11 14:06:43 -04:00
milestones_controller.rb Project tools visibility level 2016-09-01 11:47:59 -03:00
network_controller.rb Refactor method name 2016-11-08 05:12:17 +09:00
notes_controller.rb Merge branch 'diff-line-comment-vuejs' into 'master' 2016-08-19 02:24:34 +00:00
pipelines_controller.rb Improve code readability in pipelines controller 2016-11-07 13:33:04 +01:00
pipelines_settings_controller.rb Expose coverage report badge in pipeline settings 2016-08-15 14:39:46 +02:00
project_members_controller.rb Implement CreateMembers service to make controller thin 2016-11-01 10:17:04 +02:00
protected_branches_controller.rb Backport changes from gitlab-org/gitlab-ee!581 to CE. 2016-08-16 11:05:14 +05:30
raw_controller.rb
refs_controller.rb Create PipelinesSettingsController for showing settings page 2016-07-20 14:39:06 +02:00
releases_controller.rb
repositories_controller.rb
runner_projects_controller.rb Use Ability to check pre-requisite. Change back to 403 because: 2016-06-29 19:04:06 +08:00
runners_controller.rb Rename according to: 2016-06-20 16:52:05 +08:00
services_controller.rb Defer saving project services to the database if there are no user changes 2016-11-16 12:46:07 +01:00
snippets_controller.rb Start Frontend work, fix routing problem 2016-09-19 19:50:40 +03:00
tags_controller.rb Fix lightweight tags not processed correctly by GitTagPushService 2016-10-28 13:53:18 -03:00
templates_controller.rb Load issues and merge requests templates from repository 2016-08-16 15:50:17 -03:00
todos_controller.rb Cache todos pending/done dashboard query counts 2016-07-12 18:57:52 +02:00
tree_controller.rb
triggers_controller.rb
uploads_controller.rb First support of videos in issues, MRs and notes 2016-07-19 18:51:09 +02:00
variables_controller.rb
wikis_controller.rb Rename `markdown_preview` routes to `preview_markdown` 2016-08-11 15:54:18 +02:00