4e63411daa
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 |
||
---|---|---|
.. | ||
auth | ||
boards | ||
ci | ||
files | ||
groups | ||
issuable | ||
issues | ||
labels | ||
members | ||
merge_requests | ||
milestones | ||
notes | ||
projects | ||
protected_branches | ||
search | ||
slash_commands | ||
compare_service_spec.rb | ||
create_deployment_service_spec.rb | ||
create_release_service_spec.rb | ||
create_snippet_service_spec.rb | ||
create_tag_service_spec.rb | ||
delete_merged_branches_service_spec.rb | ||
delete_tag_service_spec.rb | ||
delete_user_service_spec.rb | ||
destroy_group_service_spec.rb | ||
event_create_service_spec.rb | ||
git_hooks_service_spec.rb | ||
git_push_service_spec.rb | ||
git_tag_push_service_spec.rb | ||
import_export_clean_up_service_spec.rb | ||
notification_service_spec.rb | ||
repair_ldap_blocked_user_service_spec.rb | ||
repository_archive_clean_up_service_spec.rb | ||
search_service_spec.rb | ||
system_hooks_service_spec.rb | ||
system_note_service_spec.rb | ||
test_hook_service_spec.rb | ||
todo_service_spec.rb | ||
update_release_service_spec.rb | ||
update_snippet_service_spec.rb |