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 |
||
---|---|---|
.. | ||
admin | ||
ci | ||
concerns | ||
dashboard | ||
explore | ||
groups | ||
import | ||
oauth | ||
profiles | ||
projects | ||
sherlock | ||
abuse_reports_controller.rb | ||
application_controller.rb | ||
autocomplete_controller.rb | ||
confirmations_controller.rb | ||
dashboard_controller.rb | ||
emojis_controller.rb | ||
groups_controller.rb | ||
health_check_controller.rb | ||
help_controller.rb | ||
invites_controller.rb | ||
jwt_controller.rb | ||
koding_controller.rb | ||
notification_settings_controller.rb | ||
omniauth_callbacks_controller.rb | ||
passwords_controller.rb | ||
profiles_controller.rb | ||
projects_controller.rb | ||
registrations_controller.rb | ||
root_controller.rb | ||
search_controller.rb | ||
sent_notifications_controller.rb | ||
sessions_controller.rb | ||
snippets_controller.rb | ||
uploads_controller.rb | ||
users_controller.rb |