diff options
author | Mathieu Parent <math.parent@gmail.com> | 2019-05-28 18:09:02 +0200 |
---|---|---|
committer | Mathieu Parent <math.parent@gmail.com> | 2019-07-03 16:18:05 +0200 |
commit | 32bbb52c19cf804c94a15e34d69a036d08acd35a (patch) | |
tree | 8fdeccb78342e4ef3b66e92be811e29802d5003a /lib | |
parent | 4abb68f8d6b94a97aa670d7511c6ed976f9ce2a6 (diff) | |
download | gitlab-ce-32bbb52c19cf804c94a15e34d69a036d08acd35a.tar.gz |
Fix API performance problem of auto_devops query
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 7bf66589616..5eae87fea02 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -201,6 +201,7 @@ module API # MR describing the solution: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20555 projects_relation.preload(:project_feature, :route) .preload(:import_state, :tags) + .preload(:auto_devops) .preload(namespace: [:route, :owner]) end # rubocop: enable CodeReuse/ActiveRecord @@ -307,6 +308,7 @@ module API # MR describing the solution: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20555 super(projects_relation).preload(:group) .preload(:ci_cd_settings) + .preload(:auto_devops) .preload(project_group_links: { group: :route }, fork_network: :root_project, fork_network_member: :forked_from_project, |