diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-11-16 16:27:54 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-11-16 16:27:54 +0000 |
commit | 4e63411daae631c5e6221fe8ee674f55239e713b (patch) | |
tree | 3eca7c861bc047ec72f748fbed7a64056432e480 /app/views | |
parent | 891465ba8cd57bb928e82ba070f2d7efb63f6282 (diff) | |
parent | ef3be00a0297dfa31002616df6ee49a0e2132cb7 (diff) | |
download | gitlab-ce-4e63411daae631c5e6221fe8ee674f55239e713b.tar.gz |
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
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/services/index.html.haml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/projects/services/index.html.haml b/app/views/projects/services/index.html.haml index 4a33a5bc6f6..66fd3029dc9 100644 --- a/app/views/projects/services/index.html.haml +++ b/app/views/projects/services/index.html.haml @@ -28,5 +28,6 @@ %td.hidden-xs = service.description %td.light - = time_ago_in_words service.updated_at - ago + - if service.updated_at.present? + = time_ago_in_words service.updated_at + ago |