diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-04-18 15:41:42 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-04-18 15:51:39 +0200 |
commit | 6f292eaa69c771cec8a81d2edaad19a26ab3eae6 (patch) | |
tree | 30ef0c062121834b2dca4f4a87bc7af72e071962 /app/models/deploy_key.rb | |
parent | 019c0d5761b55ca21fd71d547dd4a2ebf14d615f (diff) | |
download | gitlab-ce-6f292eaa69c771cec8a81d2edaad19a26ab3eae6.tar.gz |
Revert the addition of goldiloader
This reverts the addition of the "goldiloader" Gem and all use of it.
While this Gem is very promising it's causing a variety of problems on
GitLab.com due to it eager-loading too much data in places where we
don't expect/can handle this. At least for the time being this means we
have to go back to manually fixing N+1 query problems, but at least
those should not cause a negative impact on availability.
Diffstat (limited to 'app/models/deploy_key.rb')
-rw-r--r-- | app/models/deploy_key.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/deploy_key.rb b/app/models/deploy_key.rb index 858b7ef533e..89a74b7dcb1 100644 --- a/app/models/deploy_key.rb +++ b/app/models/deploy_key.rb @@ -2,7 +2,7 @@ class DeployKey < Key include IgnorableColumn has_many :deploy_keys_projects, inverse_of: :deploy_key, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent - has_many :projects, -> { auto_include(false) }, through: :deploy_keys_projects + has_many :projects, through: :deploy_keys_projects scope :in_projects, ->(projects) { joins(:deploy_keys_projects).where('deploy_keys_projects.project_id in (?)', projects) } scope :are_public, -> { where(public: true) } |