-
- Downloads
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
No related branches found
No related tags found
Showing
- app/controllers/projects/services_controller.rb 2 additions, 3 deletionsapp/controllers/projects/services_controller.rb
- app/models/project.rb 12 additions, 8 deletionsapp/models/project.rb
- app/models/service.rb 2 additions, 2 deletionsapp/models/service.rb
- app/services/projects/create_service.rb 8 additions, 1 deletionapp/services/projects/create_service.rb
- app/views/projects/services/index.html.haml 3 additions, 2 deletionsapp/views/projects/services/index.html.haml
- changelogs/unreleased/adam-build-missing-services-when-necessary.yml 4 additions, 0 deletions...unreleased/adam-build-missing-services-when-necessary.yml
- lib/api/helpers.rb 1 addition, 16 deletionslib/api/helpers.rb
- spec/models/project_spec.rb 0 additions, 6 deletionsspec/models/project_spec.rb
- spec/models/service_spec.rb 3 additions, 7 deletionsspec/models/service_spec.rb
- spec/requests/api/services_spec.rb 1 addition, 2 deletionsspec/requests/api/services_spec.rb
- spec/services/projects/create_service_spec.rb 13 additions, 7 deletionsspec/services/projects/create_service_spec.rb
Loading
Please register or sign in to comment