diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/serializers/environment_serializer.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'app/serializers/environment_serializer.rb')
-rw-r--r-- | app/serializers/environment_serializer.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/app/serializers/environment_serializer.rb b/app/serializers/environment_serializer.rb index 11445f93609..8d9b73b2290 100644 --- a/app/serializers/environment_serializer.rb +++ b/app/serializers/environment_serializer.rb @@ -52,17 +52,13 @@ class EnvironmentSerializer < BaseSerializer end def batch_load(resource) - if ::Feature.enabled?(:custom_preloader_for_deployments, default_enabled: :yaml) - resource = resource.preload(environment_associations.except(:last_deployment, :upcoming_deployment)) + resource = resource.preload(environment_associations.except(:last_deployment, :upcoming_deployment)) - Preloaders::Environments::DeploymentPreloader.new(resource) - .execute_with_union(:last_deployment, deployment_associations) + Preloaders::Environments::DeploymentPreloader.new(resource) + .execute_with_union(:last_deployment, deployment_associations) - Preloaders::Environments::DeploymentPreloader.new(resource) - .execute_with_union(:upcoming_deployment, deployment_associations) - else - resource = resource.preload(environment_associations) - end + Preloaders::Environments::DeploymentPreloader.new(resource) + .execute_with_union(:upcoming_deployment, deployment_associations) resource.all.to_a.tap do |environments| environments.each do |environment| |